home *** CD-ROM | disk | FTP | other *** search
/ Enter 2001 April / EnterCD4.iso / Update / SQL Server SP3 / sql70sp3i.exe / X86 / books / tblshsp2.chm / basics / shared.js < prev    next >
Encoding:
JavaScript  |  2000-01-10  |  105.8 KB  |  2,434 lines

  1. //********************* Flag to select TXT or XML Glossary ************************************
  2. var xmlGloss = true;
  3.  
  4. //************************** LOCALIZATION VARIABLES ****************************
  5. //******************************************************************************
  6. //*************************** EDIT THESE VARIABLES *****************************
  7. //******************************************************************************
  8. //******************************************************************************
  9.  
  10. //SETS THE EXPAND/COLLAPSES ALT TEXT********************************************
  11. //******************************************************************************
  12. var L_ExpandCollapseAlt_ToolTip = "Expand or collapse text";
  13.  
  14. //SETS THE GLOSSARY POPUPS ALT TEXT*********************************************
  15. //******************************************************************************
  16. var L_GlossaryAlt_ToolTip = "View definition";
  17.  
  18. //BROWSER ALERT FOR GLOSSARY POPUPS*********************************************
  19. //******************************************************************************
  20. var L_BrowserAlert_Message = "You must use IE4 or greater in order to view popup glossary definitions";
  21.  
  22. //TIP GIFS ALT TEXT*************************************************************
  23. //******************************************************************************
  24. var L_TipImgAlt_AlternativeText = "Tip";
  25.  
  26. //NOTE GIFS ALT TEXT************************************************************
  27. //******************************************************************************
  28. var L_NoteImgAlt_AlternativeText = "Note";
  29.  
  30. //IMPORTANT GIFS ALT TEXT*******************************************************
  31. //******************************************************************************
  32. var L_ImportantImgAlt_AlternativeText = "Important";
  33.  
  34. //CAUTION GIFS ALT TEXT*********************************************************
  35. //******************************************************************************
  36. var L_CautionImgAlt_AlternativeText = "Caution";
  37.  
  38. //WARNING GIFS ALT TEXT*********************************************************
  39. //******************************************************************************
  40. var L_WarningImgAlt_AlternativeText = "Warning";
  41.  
  42. //CONCEPT GIFS ALT TEXT*********************************************************
  43. //******************************************************************************
  44. var L_ConceptImgAlt_ToolTip = "Concept";
  45.  
  46. //PROCEDURE GIFS ALT TEXT*******************************************************
  47. //******************************************************************************
  48. var L_ProcedureImgAlt_ToolTip = "How to ...";
  49.  
  50. //URL GIFS ALT TEXT*************************************************************
  51. //******************************************************************************
  52. var L_UrlImgAlt_ToolTip = "Web link";
  53.  
  54. //RELATED TOPICS ALT TEXT*******************************************************
  55. //******************************************************************************
  56. var L_RelTopAlt_AlternativeText = "View Related Topics";
  57. var L_RelTopHeader_Text = "<P><B>Related Topics</B></P>";
  58.  
  59. //GRAPHICS TEXT - HOT TEXT UNDER THE GRAPHIC************************************
  60. //******************************************************************************
  61. var L_GraphicClickText_Text = "Enlarge figure";
  62.  
  63. //IF THE GLOSSARY DOESN'T CONTAIN THE TERM THIS IS THE USER ALERT***************
  64. //******************************************************************************
  65. var L_NoDefAlertTitle_Text = "definition unavailable";
  66. var L_NoDefAlert_Text = "The glossary term and definition do not exist in the glossary file at this time.";
  67.  
  68. //ERROR TEXT USED WHEN A LINKED FILE DOESN'T LOAD PROPERLY**********************
  69. //******************************************************************************
  70. var L_Error_Text = "There was an error loading the HTML file";
  71.  
  72. //NOTES ALIGNMENT PROPERTIES****************************************************
  73. //******************************************************************************
  74. var L_NotesAlign_Style = "STYLE='MARGIN-LEFT:0EM;'";
  75.  
  76. //RELATED TOPICS POPUP ALIGNMENT PROPERTIES*************************************
  77. //******************************************************************************
  78. var L_RelPopAlign1_Style = "STYLE='MARGIN-TOP:-1.4EM; MARGIN-RIGHT:1.6EM;'";
  79. var L_RelPopAlign1RTL_Style = "STYLE='MARGIN-TOP:-1.4EM; MARGIN-LEFT:1.6EM;'";
  80. var L_RelPopAlign1A_Style = "STYLE='MARGIN-TOP:-1.4EM;'";
  81. var L_RelPopAlign2_Style = "STYLE='MARGIN-TOP:-1.7EM; MARGIN-RIGHT:1.6EM;'";
  82. var L_RelPopAlign2A_Style = "STYLE='MARGIN-TOP:-1.7EM;'";
  83.  
  84. //RELATED TOPICS: TOP RIGHT OF PAGE ********************************************
  85. //******************************************************************************
  86. var L_RelPopPClassRight_Style = "STYLE='TEXT-ALIGN:RIGHT;'";
  87. var L_RelPopPClassLeft_Style = "STYLE='TEXT-ALIGN:LEFT;'";
  88.  
  89. //NOTES ************************************************************************
  90. //******************************************************************************
  91. var L_NotesLTR_Style = "STYLE='MARGIN-LEFT:1.5EM; MARGIN-TOP:-1.1EM;'";
  92. var L_NotesRTL_Style = "STYLE='MARGIN-RIGHT:1.5EM; MARGIN-TOP:-1.1EM;'";
  93.  
  94. //RELATED TOPICS POPUP WINDOWS FONT SIZE VARIABLE*******************************
  95. //******************************************************************************
  96. var L_RelPopFontSize_Style = "100%";
  97.  
  98. //FAQ EXPAND/COLLAPSE ALIGNMENT PROPERTIES**************************************
  99. //******************************************************************************
  100. var L_ParentFAQStyle_Style = "10PX";
  101. var L_ExCoImgAlign_Style = "MARGIN-LEFT:-10PX";
  102. var L_ExCoImgAlignRTL_Style = "MARGIN-RIGHT:-10PX;";
  103.  
  104. //GLOSSARY AND RELATED TOPICS POPUP BOX STYLE***********************************
  105. //******************************************************************************
  106. var L_PopUpBoxStyle_Style = "VISIBILITY:HIDDEN; POSITION:ABSOLUTE; TOP:0PX; LEFT:0PX; WIDTH:200PX; Z-INDEX:2; PADDING:10PX; BACKGROUND-COLOR:#FFFFCC; BORDER:SOLID 1 #333333;";
  107.  
  108. //SHORTCUTS - SMJ_F*************************************************************
  109. //******************************************************************************
  110. var L_ShortcutDIV_Text = "<P>HTML Help was unable to open the snap-in. You can manually open it by following these instructions:</P>";
  111. var L_ShortcutImgAlt_AlternativeText = "Start the snap-in now";
  112. var L_ShortcutAlign_Style = "";
  113.  
  114.  
  115. // XML Popup Code Begin
  116. // Added loc variable for "See:"
  117. var L_See_Text = "<B>See: </B>"
  118. // Added loc variable for "See also:"
  119. var L_SeeAlso_Text = "<B>See Also: </B>"
  120. // XML Popup Code End
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. //*************************** !!! LOCALIZATION !!! *****************************
  129. //******************************************************************************
  130. //************************* DO NOT EDIT ANY FURTHER ****************************
  131. //******************************************************************************
  132. //******************************************************************************
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142. //****************************** BASE VARIABLES ********************************
  143. //******************************************************************************
  144. //******************************************************************************
  145.  
  146.  
  147.  
  148. //********************** TURN ON AND OFF FEATURES HERE *************************
  149. //******************************************************************************
  150.  
  151. //TRUE = INLINE GIFS WILL APPEAR LEFT OF GLOSSARY AND EXPAND/COLLAPSE LINKS*****
  152. //******************************************************************************
  153. var InlineImgOn = true;
  154.  
  155.  
  156.  
  157. //***************** SET THE CHM THAT IS CALLED BY THE SCRIPT *******************
  158. //******************************************************************************
  159. var moniker = "MS-ITS:";
  160. var BaseReference = "tblshsp2.chm::/";
  161. var BeforeReference = moniker + BaseReference;
  162.  
  163. // XML Popup Code Begin
  164.   // Negated unnecessary hard-coded file name reference
  165.   // Also needs to be removed from all .htm files
  166.   var BeforeReference = ""
  167. // XML Popup Code End
  168.  
  169. //SPACER IMAGE******************************************************************
  170. //******************************************************************************
  171. var SpacerGiffy = BeforeReference + "Basics/spacer.gif";
  172.  
  173. //NAVIGATION TREE GRAPHIC ******************************************************
  174. //******************************************************************************
  175. var elleRTL = "<IMG STYLE='FILTER: flipH;' SRC='"+BeforeReference+"Basics/elle.gif' HEIGHT='13' WIDTH='11' ALT='' BORDER='0'>"
  176. var elleLTR = "<IMG SRC='"+BeforeReference+"Basics/elle.gif' HEIGHT='13' WIDTH='11' ALT='' BORDER='0'>"
  177.                         
  178. //MOUSEOUT TEXT COLOR***********************************************************
  179. //******************************************************************************
  180. var _Cold = "#00309C";
  181.  
  182. //MOUSEOVER TEXT COLOR**********************************************************
  183. //******************************************************************************
  184. var _Hot = "#FF9A00";
  185.  
  186. //GLOSSARY CLICK TEXT COLOR*****************************************************
  187. //******************************************************************************
  188. var _Click = "#666666";
  189.  
  190. //HTML HELP OCX CLASS INFORMATION - FOR GRAPHIC AND PROCESS WINDOWS*************
  191. //******************************************************************************
  192. var ActX = "TYPE='application/x-oleobject' CLASSID='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'";
  193.  
  194. //LINKED FILE VARIABLE**********************************************************
  195. //******************************************************************************
  196. var inCr = 0;
  197.  
  198. //LINKED FILE VARIABLE**********************************************************
  199. //******************************************************************************
  200. var theObjectIdS = new Array();
  201.  
  202. //LINKED FILE VARIABLE**********************************************************
  203. //******************************************************************************
  204. theObjectIdS[0] = "Scriptlet0";
  205.  
  206. //PICKS UP AND HOLDS GLOSSARY DEFINITION FROM TXT FILE**************************
  207. //******************************************************************************
  208. var defContent = "";
  209.  
  210. //GLOBAL VARIABLE DECLARATIONS**************************************************
  211. //******************************************************************************
  212. var specialCheck, theTimeOut, ReltopicS, TermDef, tiC, WorkText, AnotherTagIndex;
  213. var noPopups, noPopupsMsg, ieX, ieY, popOpen, theImg, theDiv, PopUp_InAPopUp, e;
  214. var AnotherCheck, WindowOne, WindowTwo, theTagIndex, theTagIndex2, sParamFILE;
  215. var lastClickedPopUp, IE4, IE5, checkIt2, checkIt, LiNker, HoldBookTitLe;
  216. var HoldBookTitLe2;
  217.  
  218. //XML Popup Code begin
  219. var xmlTermRoot;              //XML term root variable (move into function later)
  220. var xmlPopupContent;        //XML content formatted for popup
  221. var xmlDOM;             //The XMLDOM ActiveX object model
  222. var xmlDOMLoaded = false;    //Not loaded until first glossary popup, 
  223.                 //   then persists for see alsos in popup
  224. var xmlFile = "Basics/Gloss.xml";        //File containing glossary XML
  225. //XML Popup Code end
  226.  
  227.  
  228. //************************ EXPAND/COLLAPSE GIF VARIABLES ***********************
  229. //******************************************************************************
  230. if (InlineImgOn){
  231.     //SETS INITIAL HEIGHT AND WIDTH ON THE GIFS*********************************
  232.     //**************************************************************************
  233.     if (document.dir == "rtl"){
  234.         var initialClosed = "<IMG CLASS='ExPand' STYLE='FILTER: flipH;' SRC='"+BeforeReference+"Basics/coe.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ExpandCollapseAlt_ToolTip+"' BORDER='0'>";}
  235.     else{
  236.         var initialClosed = "<IMG CLASS='ExPand' SRC='"+BeforeReference+"Basics/coe.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ExpandCollapseAlt_ToolTip+"' BORDER='0'>";}
  237.     if (document.dir == "rtl"){
  238.         var initialClosed_B = "<IMG CLASS='ExPand' STYLE='"+L_ExCoImgAlignRTL_Style+" FILTER: flipH;' SRC='"+BeforeReference+"Basics/coe.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ExpandCollapseAlt_ToolTip+"' BORDER='0'>";}
  239.     else{
  240.         var initialClosed_B = "<IMG CLASS='ExPand' STYLE='"+L_ExCoImgAlign_Style+"' SRC='"+BeforeReference+"Basics/coe.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ExpandCollapseAlt_ToolTip+"' BORDER='0'>";}
  241.  
  242.     //SETS GIFS FOR THE VARIOUS EXPAND/COLLAPSE STATES**************************
  243.     //**************************************************************************
  244.     var closed = BeforeReference + "Basics/coe.gif";
  245.     var expand = BeforeReference + "Basics/coc.gif";
  246.     var closedHot = BeforeReference + "Basics/coeb.gif";
  247.     var expandHot = BeforeReference + "Basics/cocb.gif";}
  248.  
  249.  
  250.  
  251. //*************************** GLOSSARY GIF VARIABLES ***************************
  252. //******************************************************************************
  253. if (InlineImgOn){
  254.     //SETS INITIAL HEIGHT AND WIDTH ON THE GIFS*********************************
  255.     //**************************************************************************
  256.     if (document.dir == "rtl"){
  257.         var glossInitial = "<IMG CLASS='PopUp' STYLE='FILTER: flipH;' SRC='"+BeforeReference+"Basics/glossarycold.gif' HEIGHT='9' WIDTH='12' ALT='"+L_GlossaryAlt_ToolTip+"' BORDER='0'>";}
  258.     else{
  259.         var glossInitial = "<IMG CLASS='PopUp' SRC='"+BeforeReference+"Basics/glossarycold.gif' HEIGHT='9' WIDTH='12' ALT='"+L_GlossaryAlt_ToolTip+"' BORDER='0'>";}
  260.  
  261.     //SETS GIFS FOR THE VARIOUS GLOSSARY STATES*********************************
  262.     //**************************************************************************
  263.     var glossaryCold = BeforeReference + "Basics/glossarycold.gif";
  264.     var glossaryHot = BeforeReference + "Basics/glossaryhot.gif";
  265.     var glossaryClick = BeforeReference + "Basics/glossaryclick.gif";}
  266.  
  267. //GLOSSARY POPUP WINDOW VARIABLE************************************************
  268. //******************************************************************************
  269. var popupDIV = "<DIV ID='popUpWindow' STYLE='"+L_PopUpBoxStyle_Style+"'>" + "</DIV>";
  270.  
  271. //GLOSSARY POPUP BROWSER CHECK VARIABLE*****************************************
  272. //******************************************************************************
  273. var browser = navigator.appName + " " + parseInt(navigator.appVersion);
  274.  
  275.  
  276.  
  277. //**************** RELATED TOPICS POPUP FUNCTIONALITY VARIABLES ****************
  278. //******************************************************************************
  279.  
  280. //RELATED TOPICS POPUP WINDOW VARIABLE******************************************
  281. //******************************************************************************
  282. var RelPopupDiV = "<DIV ID='RelpopUpWindow' STYLE='"+L_PopUpBoxStyle_Style+"'>" + "</DIV>";
  283.  
  284. //RELATED TOPICS POPUP INITIAL GIF IMG******************************************
  285. //******************************************************************************
  286. if (document.dir == "rtl"){
  287.     var InnerNavInitial = "<IMG CLASS='HIDEREL' STYLE='FILTER: flipH;' SRC='"+BeforeReference +"Basics/relglyph.gif' HEIGHT='18' WIDTH='26' ALT='"+L_RelTopAlt_AlternativeText+"' BORDER='0'>";}
  288. else{ 
  289.     var InnerNavInitial = "<IMG CLASS='HIDEREL' SRC='"+BeforeReference +"Basics/relglyph.gif' HEIGHT='18' WIDTH='26' ALT='"+L_RelTopAlt_AlternativeText+"' BORDER='0'>";}
  290.  
  291. //NO RELATED TOPICS POPUP - SPACE GIF HOLDS POSITION FOR H1 AND PROCLABEL*******
  292. //******************************************************************************
  293. var RelPopSpacerGif = "<IMG CLASS='HIDEREL' SRC='"+SpacerGiffy+"' HEIGHT='18' WIDTH='26' ALT='' BORDER='0'>";
  294.  
  295. //RELATED TOPICS POPUP MOUSEOUT GIF*********************************************
  296. //******************************************************************************
  297. var InnerNavCold = BeforeReference + "Basics/relglyph.gif";
  298.  
  299. //RELATED TOPICS POPUP MOUSEOVER GIF********************************************
  300. //******************************************************************************
  301. var InnerNavHot = BeforeReference + "Basics/relglyph_.gif";
  302.  
  303. //RELATED TOPICS POPUP CLICKED GIF**********************************************
  304. //******************************************************************************
  305. var InnerNavClick = BeforeReference + "Basics/relglyph_c.gif";
  306.  
  307.  
  308.  
  309. //************************ RELATED TOPICS GIF VARIABLES ************************
  310. //******************************************************************************
  311.  
  312. //SPACER GIF FOR THE RELATED TOPICS LINKS AT THE BOTTOM OF THE PAGE*************
  313. //******************************************************************************
  314. var RelTOpSpacerGif = "<IMG STYLE='DISPLAY:NONE;' SRC='"+SpacerGiffy+"' HEIGHT='14' WIDTH='20' ALT='' BORDER='0'>";
  315.  
  316.  
  317.  
  318. //***************************** NOTES GIF VARIABLES ****************************
  319. //******************************************************************************
  320.  
  321. //SETS TIP GIF******************************************************************
  322. //******************************************************************************
  323. var tipImg = "<IMG "+L_NotesAlign_Style+" SRC='"+BeforeReference+"Basics/tip.gif' HEIGHT='11' WIDTH='12' ALT='"+L_TipImgAlt_AlternativeText+"' BORDER='0'>";
  324.  
  325. //SETS NOTE GIF*****************************************************************
  326. //******************************************************************************
  327. var noteImg = "<IMG "+L_NotesAlign_Style+" SRC='"+BeforeReference+"Basics/note.gif' HEIGHT='11' WIDTH='12' ALT='"+L_NoteImgAlt_AlternativeText+"' BORDER='0'>";
  328.  
  329. //SETS IMPORTANT GIF************************************************************
  330. //******************************************************************************
  331. var importantImg = "<IMG "+L_NotesAlign_Style+" SRC='"+BeforeReference+"Basics/important.gif' HEIGHT='11' WIDTH='12' ALT='"+L_ImportantImgAlt_AlternativeText+"' BORDER='0'>";
  332.  
  333. //SETS CAUTION GIF**************************************************************
  334. //******************************************************************************
  335. var cautionImg = "<IMG "+L_NotesAlign_Style+" SRC='"+BeforeReference+"Basics/caution.gif' HEIGHT='11' WIDTH='12' ALT='"+L_CautionImgAlt_AlternativeText+"' BORDER='0'>";
  336.  
  337. //SETS WARNING GIF**************************************************************
  338. //******************************************************************************
  339. var warningImg = "<IMG "+L_NotesAlign_Style+" SRC='"+BeforeReference+"Basics/warning.gif' HEIGHT='11' WIDTH='12' ALT='"+L_WarningImgAlt_AlternativeText+"' BORDER='0'>";
  340.  
  341.  
  342.  
  343.  
  344. //**************************** LINKED FILE VARIABLES ***************************
  345. //******************************************************************************
  346.  
  347. //ENABLES LINKED FILE TO WORK***************************************************
  348. //******************************************************************************
  349. function public_get_innerHTML(){return document.body.innerHTML;}
  350.  
  351. //FOR THE LINKED FILE - STORES INITIAL TIMEOUT**********************************
  352. //******************************************************************************
  353. var tiC = 0;
  354.  
  355.  
  356.  
  357. //**************************** SHORTCUT GIF VARIABLES **************************
  358. //************************************ SMJ_F ***********************************
  359.  
  360. //SETS SHORTCUT GIFS************************************************************
  361. //******************************************************************************
  362. var shortcutIMG_Hot    = "<IMG "+L_ShortcutAlign_Style+" SRC='"+BeforeReference+"Basics/shortcuthot.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ShortcutImgAlt_AlternativeText+"' BORDER='0'>";
  363. var shortcutIMG_Cold = "<IMG "+L_ShortcutAlign_Style+" SRC='"+BeforeReference+"Basics/shortcutcold.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ShortcutImgAlt_AlternativeText+"' BORDER='0'>";
  364. var shortcutIMG_Selected = "<IMG "+L_ShortcutAlign_Style+" SRC='"+BeforeReference+"Basics/shortcutclick.gif' HEIGHT='9' WIDTH='12' ALT='"+L_ShortcutImgAlt_AlternativeText+"' BORDER='0'>";
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374. //******************************** FUNCTIONS ***********************************
  375. //******************************************************************************
  376. //******************************************************************************        
  377.  
  378.  
  379.  
  380. //******************* WRITES ALTERED/ADDITIONAL CSS VALUES *********************
  381. //******************************************************************************
  382. if (!InlineImgOn){
  383.     var CSSInsertion = "<STYLE><!--";
  384.      CSSInsertion += "DIV.EXPAND {MARGIN-LEFT:1EM; MARGIN-RIGHT:1EM;}";
  385.      CSSInsertion += "DIV.EXPAND2 {MARGIN-LEFT:1EM; MARGIN-RIGHT:1EM;}";
  386.     CSSInsertion += "@FONT-FACE {FONT-FAMILY:MYFONTONE; FONT-STYLE:NORMAL;";
  387.     CSSInsertion += "FONT-WEIGHT:NORMAL; SRC:URL";
  388.     CSSInsertion += "(" +BeforeReference+ "Basics/FRANKLI1.eot);}";
  389.     CSSInsertion += "@FONT-FACE {FONT-FAMILY:MYFONTTWO; FONT-STYLE:NORMAL;";
  390.     CSSInsertion += "FONT-WEIGHT:NORMAL; SRC:URL";
  391.     CSSInsertion += "(" +BeforeReference+ "Basics/FRANKLI0.eot);}";
  392.     CSSInsertion += ".BOOKTITLEA {BACKGROUND-IMAGE:URL";
  393.     CSSInsertion += "(" +BeforeReference+ "Basics/banner.gif);}";
  394.     CSSInsertion += ".BOOKTITLEB {BACKGROUND-IMAGE:URL";
  395.     CSSInsertion += "(" +BeforeReference+ "Basics/banner_.gif);}";
  396.     CSSInsertion += ".RTLIMAGEARTL {BACKGROUND-IMAGE:URL";
  397.     CSSInsertion += "(" +BeforeReference+ "Basics/banner2.gif);}";
  398.     CSSInsertion += ".RTLIMAGEBRTL {BACKGROUND-IMAGE:URL";
  399.     CSSInsertion += "(" +BeforeReference+ "Basics/banner_2.gif);}";
  400.     CSSInsertion += "//--></STYLE>";
  401.     document.write(CSSInsertion);}
  402. else{
  403.     var CSSInsertion = "<STYLE><!--";
  404.      CSSInsertion += "@FONT-FACE {FONT-FAMILY:MYFONTONE; FONT-STYLE:NORMAL;";
  405.     CSSInsertion += "FONT-WEIGHT:NORMAL; SRC:URL";
  406.     CSSInsertion += "(" +BeforeReference+ "Basics/FRANKLI1.eot);}";
  407.     CSSInsertion += "@FONT-FACE {FONT-FAMILY:MYFONTTWO; FONT-STYLE:NORMAL;";
  408.     CSSInsertion += "FONT-WEIGHT:NORMAL; SRC:URL";
  409.     CSSInsertion += "(" +BeforeReference+ "Basics/FRANKLI0.eot);}";
  410.     CSSInsertion += ".BOOKTITLEA {BACKGROUND-IMAGE:URL";
  411.     CSSInsertion += "(" +BeforeReference+ "Basics/banner.gif);}";
  412.     CSSInsertion += ".BOOKTITLEB {BACKGROUND-IMAGE:URL";
  413.     CSSInsertion += "(" +BeforeReference+ "Basics/banner_.gif);}";
  414.     CSSInsertion += ".RTLIMAGEARTL {BACKGROUND-IMAGE:URL";
  415.     CSSInsertion += "(" +BeforeReference+ "Basics/banner2.gif);}";
  416.     CSSInsertion += ".RTLIMAGEBRTL {BACKGROUND-IMAGE:URL";
  417.     CSSInsertion += "(" +BeforeReference+ "Basics/banner_2.gif);}";
  418.     CSSInsertion += "//--></STYLE>";
  419.     document.write(CSSInsertion);}        
  420.  
  421.  
  422.  
  423. //********************* BROWSER CHECK FOR GLOSSARY POPUPS **********************
  424. //******************************************************************************
  425. if ((browser == 'Microsoft Internet Explorer 4') || (browser == 'Microsoft Internet Explorer 5')){
  426.     IE4 = true;}
  427.     
  428. else{
  429.     noPopups = true;}
  430.  
  431.  
  432.  
  433. //********************* BROWSER CHECK FOR GLOSSARY POPUPS **********************
  434. //******************************************************************************
  435. if ((navigator.appVersion.indexOf("MSIE 5") > 0) || ((navigator.appVersion.indexOf("MSIE") > 0 && parseInt(navigator.appVersion) >= 5))){
  436.     IE5 = true;}
  437.  
  438.  
  439.  
  440. //****************************** INITIALIZATION ********************************
  441. //******************************************************************************
  442. function loadInitialThings(){
  443.  
  444.   //THIS SECTION EXAMINES ALL SPAN TAGS*****************************************
  445.   //****************************************************************************
  446.   var GetTheSpans = document.all.tags('SPAN');
  447.   for (var a = 0; a < GetTheSpans.length; a++){
  448.         
  449.     //THIS WRITES THE LINKED FILE OBJECTS TO THE PAGE***************************
  450.       //**************************************************************************
  451.     if (GetTheSpans[a].id.indexOf('linkedFile') != -1){
  452.         inCr += 1;
  453.         var theIdIs = "Scriptlet" + inCr;
  454.  
  455.         //THIS VARIABLE CAPTURES AND STORES THE PROPER HTML PAGE****************
  456.           //**********************************************************************
  457.         var theUrlIs;
  458.  
  459.         //THIS SECTION GRABS THE PROPER HREF - XXX.HTM**************************
  460.           //**********************************************************************        
  461.         var aaa;
  462.         var GetTheAs = GetTheSpans[a].all.tags('A');
  463.           for (var b = 0; b < GetTheAs.length; b++){
  464.             aaa = GetTheAs[b].href.toLowerCase();
  465.             var bbb = aaa.lastIndexOf('/');
  466.             var ccc = aaa.substring(aaa, (bbb + 1));
  467.             aaa = aaa.replace(ccc,'');
  468.             break;}
  469.     
  470.         //IF IT'S IE5 ADD REFERENCE TO CHM SO IT CAN PRINT - WONT PRINT IN IE4**
  471.           //**********************************************************************
  472.         if (IE5){
  473.             theUrlIs = BeforeReference + aaa;}
  474.         else{
  475.             theUrlIs = aaa;}
  476.  
  477.         //THIS SECTION BUILDS THE OBJECTS THAT HOLD THE PROPER HTML PAGES*******
  478.           //**********************************************************************
  479.         var h = "<OBJECT ID='"+theIdIs+"' STYLE='display:none'";
  480.         h = h + "TYPE='text/x-scriptlet' DATA='"+theUrlIs+"'>";
  481.           h = h + "</OBJECT>";
  482.         
  483.         //NOW ADD LINKED FILE OBJECTS TO THE DOCUMENT***************************
  484.           //**********************************************************************
  485.         document.body.insertAdjacentHTML('beforeEnd', h);
  486.             
  487.         //COLLECT ALL NEWLY WRITTEN OBJECT ID'S*********************************
  488.           //**********************************************************************
  489.         theObjectIdS[inCr] = "Scriptlet" + inCr;
  490.         GetTheSpans[a].outerHTML = "<SPAN ID='linkedFile"+inCr+"' CLASS='linkedfile'></SPAN>";
  491.         LiNker = true;}}
  492.  
  493.     //IF THERE ARE NO LINKED FILES FINISH LOADING THE PAGE**********************
  494.     //**************************************************************************
  495.     finishOnLoad();
  496.  
  497.  
  498. return;}
  499.  
  500.  
  501.  
  502. //**************************** CALL TO A LINKED FILE ***************************
  503. //******************************************************************************
  504. function displayLinkedDocument(){
  505.  
  506.     //SCAN OBJECT ARRAY - GRAB OBJECT ID AND OBJECT TO ADD CONTENT TO***********
  507.       //**************************************************************************
  508.     var a = theObjectIdS.length;
  509.     for (var b = 1; b < a; b++){ 
  510.         var ItsIt = "linkedFile" + b;
  511.         var theSpot = theObjectIdS[b];
  512.         var seeme;
  513.         
  514.         if (document.all[theSpot].object.innerHTML != null){
  515.           seeme = document.all[theSpot].object.innerHTML;
  516.           //alert(seeme);
  517.  
  518.           //THIS REMOVES EXTRANEOUS CONTENT FROM THE LINKED FILE****************
  519.           //(a-bryanf)**********************************************************
  520.             //********************************************************************
  521.             var bbb = seeme.indexOf('<A name');
  522.             //alert("bbb="+bbb);
  523.             if (seeme.indexOf('<!--REL') != -1){
  524.                 var ccc = seeme.lastIndexOf('<!--REL');}
  525.                 //alert("relYes="+ccc);
  526.             else{
  527.                 var ccc= (seeme.lastIndexOf('<CENTER><B>This information is preliminary.')-4);}
  528.                 //alert("relNo="+ccc);
  529.             if ((bbb != -1) && (ccc != -1)){
  530.                 var aaa = seeme.substring((bbb-4), ccc);
  531.                 seeme = aaa;}}
  532.                 //alert(seeme);
  533.             
  534.         
  535.         //IF PAGE RETURNS UNDEFINED THE TIMEOUT IS UPPED AND IT'S TRIED AGAIN***
  536.           //**********************************************************************
  537.         else{
  538.           for (theTimeOut = 1; theTimeOut < 5; theTimeOut++){
  539.             if (theTimeOut != 5){
  540.                 tiC =+ 1000;
  541.                 window.setTimeout('displayLinkedDocument()', tiC);}
  542.               if (theTimeOut == 5){
  543.                 seeme = L_Error_Text;}}}
  544.         
  545.         //THIS WRITES THE OBJECT'S INNERHTML TO THE PROPER LOCATION***********
  546.           //********************************************************************
  547.         var theDocument = document.all[ItsIt];
  548.         theDocument.innerHTML = seeme;
  549.  
  550.     LiNker = false;}
  551.  
  552.  
  553. return;}
  554.  
  555.  
  556.  
  557. //**************************** FINISH LOADING THE PAGE *************************
  558. //******************************************************************************
  559. function finishOnLoad(){
  560.  
  561.   //THIS FIRST SECTION EXAMINES ALL ANCHOR TAGS*********************************
  562.   //****************************************************************************
  563.   var GetTheAs = document.all.tags('A');
  564.   for (var a = 0; a < GetTheAs.length; a++){ 
  565.     
  566.     //THIS WRITES THE THUMBNAIL GIFS********************************************
  567.       //**************************************************************************
  568.     var LtrOrRtlFloat;
  569.     if (document.dir == "rtl"){
  570.         LtrOrRtlFloat = "float: right;";}
  571.     else{
  572.         LtrOrRtlFloat = "float: left;";}
  573.         
  574.       if (GetTheAs[a].id.indexOf('ThumbNail') != -1){
  575.         var sThumbnailImg = GetTheAs[a].href.toLowerCase();
  576.         var sAltText = GetTheAs[a].title;
  577.         sThumbnailImg = get_TheUrL(sThumbnailImg);
  578.           GetTheAs[a].innerHTML = "<IMG CLASS='thumbnail' SRC='"+moniker+sThumbnailImg+"' VSPACE='4' ALT='"+sAltText+"'><BR>"+ L_GraphicClickText_Text +"<BR>";
  579.         GetTheAs[a].outerHTML = "<DIV CLASS='thumbnail' STYLE='" + LtrOrRtlFloat +"' >"+ GetTheAs[a].outerHTML +"</DIV>";}
  580.     
  581.     //THIS WRITES THE SHORTCUT GIFS - SMJ_J*************************************
  582.       //**************************************************************************
  583.     else if (GetTheAs[a].id.indexOf('shortcutA') != -1){        
  584.         var theA = GetTheAs[a];
  585.         if (InlineImgOn){
  586.             theA.innerHTML = shortcutIMG_Cold + theA.innerHTML;}
  587.         theA.title = L_ShortcutImgAlt_AlternativeText;}
  588.  
  589.  
  590.     //THIS WRITES THE GLOSSARY GIFS*********************************************
  591.       //**************************************************************************
  592.     else if (GetTheAs[a].id.indexOf('PopUp') != -1){
  593.         GetTheAs[a].title = L_GlossaryAlt_ToolTip;
  594.         if (InlineImgOn){
  595.             GetTheAs[a].innerHTML = glossInitial + GetTheAs[a].innerHTML;}}
  596.   
  597.     //THIS WRITES THE EXPAND/COLLAPSE GIFS**************************************
  598.       //**************************************************************************
  599.       else if (GetTheAs[a].id.indexOf('ExPand') != -1){
  600.         GetTheAs[a].title = L_ExpandCollapseAlt_ToolTip;
  601.         if (InlineImgOn){
  602.             GetTheAs[a].innerHTML = initialClosed + GetTheAs[a].innerHTML;}}
  603.   
  604.     //THIS WRITES THE FAQ EXPAND/COLLAPSE GIFS AND HTML*************************
  605.       //**************************************************************************
  606.     else if (GetTheAs[a].id.indexOf('FAQExPanD') != -1){
  607.         if (InlineImgOn){
  608.             if (document.dir == "rtl"){
  609.                 GetTheAs[a].parentElement.style.marginRight = L_ParentFAQStyle_Style;
  610.                 GetTheAs[a].outerHTML = "<A ID='ExPand' HREF='#'>" + initialClosed_B + GetTheAs[a].innerHTML + "</A>";}
  611.             else{
  612.                 GetTheAs[a].parentElement.style.marginLeft = L_ParentFAQStyle_Style;
  613.                 GetTheAs[a].outerHTML = "<A ID='ExPand' HREF='#'>" + initialClosed_B + GetTheAs[a].innerHTML + "</A>";}}
  614.         else{
  615.             GetTheAs[a].outerHTML = "<A ID='ExPand' HREF='#'>" + GetTheAs[a].innerHTML + "</A>";}
  616.         GetTheAs[a].title = L_ExpandCollapseAlt_ToolTip;}
  617.   
  618.     //THIS WRITES THE CONCEPT HTML**********************************************
  619.       //**************************************************************************
  620.       else if (GetTheAs[a].id.indexOf('Concept_Gif') != -1){
  621.         GetTheAs[a].outerHTML = RelTOpSpacerGif + "<P CLASS='margin'><FONT TITLE='"+L_ConceptImgAlt_ToolTip+"'>" + GetTheAs[a].outerHTML + "</FONT></P>";}
  622.        
  623.     //THIS WRITES THE PROCEDURE HTML********************************************
  624.       //**************************************************************************
  625.       else if (GetTheAs[a].id.indexOf('Procedure_Gif') != -1){
  626.         GetTheAs[a].outerHTML = RelTOpSpacerGif + "<P CLASS='margin'><FONT TITLE='"+L_ProcedureImgAlt_ToolTip+"'>" + GetTheAs[a].outerHTML + "</FONT></P>";}
  627.        
  628.     //THIS WRITES THE WORLD WIDE WEB HTML***************************************
  629.       //**************************************************************************
  630.       else if (GetTheAs[a].id.indexOf('Url_Gif') != -1){
  631.         GetTheAs[a].outerHTML = RelTOpSpacerGif + "<P CLASS='margin'><FONT TITLE='"+L_UrlImgAlt_ToolTip+"'>" + GetTheAs[a].outerHTML + "</FONT></P>";}}
  632.  
  633.  
  634.   //THIS SECOND SECTION EXAMINES ALL OL TAGS************************************
  635.   //****************************************************************************
  636.   var GetTheOls = document.all.tags('OL');
  637.   for (var a = 0; a < GetTheOls.length; a++){
  638.  
  639.     //THIS WRITES THE INDENTS FOR THE NAVIGATION TREE***************************
  640.       //**************************************************************************
  641.     if (GetTheOls[a].id.indexOf('Indent_Tree') != -1){
  642.         var caught = GetTheOls[a];
  643.         var iNum = -.25;
  644.             for (var c = 0; c < caught.all.length; c++){
  645.                 if (caught.all[c].id.indexOf('SpacE') != -1){
  646.                     if (document.dir == "rtl"){
  647.                         caught.all[c].innerHTML =  elleRTL + caught.all[c].innerHTML 
  648.                         caught.all[c].style.marginRight = (iNum + 'em');}
  649.                     else{
  650.                         caught.all[c].innerHTML =  elleLTR + caught.all[c].innerHTML 
  651.                         caught.all[c].style.marginLeft = (iNum + 'em');}
  652.                     iNum += .75;}}}}
  653.  
  654.             
  655.   //THE THIRD SECTION EXAMINES ALL DIV TAGS*************************************
  656.   //****************************************************************************
  657.   var GetTheDivs = document.all.tags('DIV');
  658.   for (var a = 0; a < GetTheDivs.length; a++){
  659.  
  660.     //THIS SETS UP THE BOOK TITLES FOR THE TOP LEVEL BOOK***********************
  661.       //**************************************************************************
  662.       if (GetTheDivs[a].id.indexOf('BookTopTitlE') != -1){
  663.       var c = GetTheDivs[a].innerHTML;
  664.  
  665.       //HOLDS BOOKTITLE INFORMATION*********************************************
  666.         //************************************************************************
  667.       HoldBookTitLe = c;    
  668.       
  669.       //THIS SECTION REMOVES HTML HELP SEARCH HTML******************************
  670.         //************************************************************************
  671.       if (c.indexOf('BACKGROUND-COLOR:') != -1){
  672.         var aa = "</FONT>";
  673.         c = c.replace(aa, '');
  674.         var bb = c.indexOf('<');
  675.         var cc = c.indexOf('>');
  676.           var dd = c.substring(bb, (cc + 1));
  677.         c = c.replace(dd,'');
  678.  
  679.         //HOLDS BOOKTITLE INFORMATION*******************************************
  680.             //**********************************************************************
  681.         HoldBookTitLe = c;
  682.  
  683.         //THE STRING "C" IS FREE OF HTML HELP ADDED MATERIAL********************
  684.             //**********************************************************************
  685.         var d, f, g, h, test;
  686.          if(HoldBookTitLe.length > 60){
  687.             d = (parseInt(c.length/3));
  688.             f = (parseInt(c.length/8));
  689.             g = ((d) + (f));
  690.             h = c.substring(0, g);
  691.             test = h.lastIndexOf(' ');}
  692.          else{
  693.             d = (parseInt(c.length/3));
  694.             f = (parseInt(c.length/10));
  695.             g = ((d) + (f));
  696.             h = c.substring(0, g);
  697.             test = h.lastIndexOf(' ');}
  698.  
  699.         if (document.dir == "rtl"){
  700.             if(test == -1){
  701.                 var firstString = c;
  702.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:LEFT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='booktitleARTL'><DIV CLASS='rtlimageARTL'></DIV><DIV CLASS='booktitletextoneARTL' ID='booktitletextoneARTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoARTL' ID='booktitletexttwoARTL'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespecialspacerRTL'></DIV><DIV CLASS='booktitlespacerARTL'></DIV>\n\n";}
  703.             else{
  704.                 var firstString = h.substring(0, test);
  705.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  706.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:LEFT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='booktitleARTL'><DIV CLASS='rtlimageARTL'></DIV><DIV CLASS='booktitletextoneARTL' ID='booktitletextoneARTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoARTL' ID='booktitletexttwoARTL'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespecialspacerRTL'></DIV><DIV CLASS='booktitlespacerARTL'></DIV>\n\n";}}
  707.         else{
  708.             if(test == -1){
  709.                 var firstString = c;
  710.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:RIGHT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='BookTitleA'><DIV CLASS='BookTitleTextOneA' ID='BookTitleTextOneA'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoA' ID='BookTitleTextTwoA'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpecialSpacer'></DIV><DIV CLASS='BookTitleSpacerA'></DIV>\n\n";}
  711.             else{
  712.                 var firstString = h.substring(0, test);
  713.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  714.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:RIGHT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='BookTitleA'><DIV CLASS='BookTitleTextOneA' ID='BookTitleTextOneA'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoA' ID'BookTitleTextTwoA'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpecialSpacer'></DIV><DIV CLASS='BookTitleSpacerA'></DIV>\n\n";}}}
  715.             
  716.       //THIS OCCURS WHEN HTML HELP DOESN'T ADD HTML*****************************
  717.         //************************************************************************
  718.       else{
  719.         var d, f, g, h, test;
  720.          if(HoldBookTitLe.length > 60){
  721.             d = (parseInt(c.length/3));
  722.             f = (parseInt(c.length/8));
  723.             g = ((d) + (f));
  724.             h = c.substring(0, g);
  725.             test = h.lastIndexOf(' ');}
  726.          else{
  727.             d = (parseInt(c.length/3));
  728.             f = (parseInt(c.length/10));
  729.             g = ((d) + (f));
  730.             h = c.substring(0, g);
  731.             test = h.lastIndexOf(' ');}
  732.         
  733.         if (document.dir == "rtl"){
  734.             if(test == -1){
  735.                 var firstString = c;
  736.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:LEFT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='booktitleARTL'><DIV CLASS='rtlimageARTL'></DIV><DIV CLASS='booktitletextoneARTL' ID='booktitletextoneARTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoARTL' ID='booktitletexttwoARTL'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespecialspacerRTL'></DIV><DIV CLASS='booktitlespacerARTL'></DIV>\n\n";}
  737.             else{
  738.                 var firstString = h.substring(0, test);
  739.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  740.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:LEFT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='booktitleARTL'><DIV CLASS='rtlimageARTL'></DIV><DIV CLASS='booktitletextoneARTL' ID='booktitletextoneARTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoARTL' ID='booktitletexttwoARTL'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespecialspacerRTL'></DIV><DIV CLASS='booktitlespacerARTL'></DIV>\n\n";}}
  741.         else{
  742.             if(test == -1){
  743.                 var firstString = c;
  744.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:RIGHT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='BookTitleA'><DIV CLASS='BookTitleTextOneA' ID='BookTitleTextOneA'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoA' ID='BookTitleTextTwoA'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpecialSpacer'></DIV><DIV CLASS='BookTitleSpacerA'></DIV>\n\n";}
  745.             else{
  746.                 var firstString = h.substring(0, test);
  747.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  748.                 GetTheDivs[a].outerHTML = "<SPAN CLASS='PrintBookTitle' STYLE='TEXT-ALIGN:RIGHT;'>" +HoldBookTitLe+ "<HR WIDTH='100%' NOSHADE STYLE='HEIGHT:1PX; WIDTH:100%;'></SPAN>\n\n<DIV CLASS='BookTitleA'><DIV CLASS='BookTitleTextOneA' ID='BookTitleTextOneA'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoA' ID='BookTitleTextTwoA'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpecialSpacer'></DIV><DIV CLASS='BookTitleSpacerA'></DIV>\n\n";}}}
  749.      if(HoldBookTitLe.length > 60){
  750.         if(document.dir == "rtl"){
  751.             booktitletextoneARTL.style.fontSize = "10PT"
  752.             booktitletexttwoARTL.style.fontSize = "8PT";
  753.             booktitletexttwoARTL.style.letterSpacing = "-.2MM";
  754.             booktitletextoneARTL.style.top = "2PX";
  755.             booktitletexttwoARTL.style.top = "14PX";}
  756.         else{
  757.             BookTitleTextOneA.style.fontSize = "10PT"
  758.             BookTitleTextTwoA.style.fontSize = "8PT";
  759.             BookTitleTextTwoA.style.letterSpacing = "-.2MM";
  760.             BookTitleTextOneA.style.top = "2PX";
  761.             BookTitleTextTwoA.style.top = "14PX";}}}
  762.  
  763.  
  764.     //THIS SETS UP THE BOOK TITLES FOR ALL OTHER THAN THE TOP LEVEL BOOK********
  765.     //**************************************************************************
  766.     else if (GetTheDivs[a].id.indexOf('BooKTitlE') != -1){
  767.       var c = GetTheDivs[a].innerHTML;
  768.  
  769.       //HOLDS BOOKTITLE INFORMATION*********************************************
  770.         //************************************************************************
  771.       HoldBookTitLe = c;    
  772.       
  773.       //THIS SECTION REMOVES HTML HELP SEARCH HTML******************************
  774.         //************************************************************************
  775.       if (c.indexOf('BACKGROUND-COLOR:') != -1){
  776.         var aa = "</FONT>";
  777.         c = c.replace(aa, '');
  778.         var bb = c.indexOf('<');
  779.         var cc = c.indexOf('>');
  780.           var dd = c.substring(bb, (cc + 1));
  781.         c = c.replace(dd,'');
  782.  
  783.         //HOLDS BOOKTITLE INFORMATION*******************************************
  784.             //**********************************************************************
  785.         HoldBookTitLe = c;    
  786.  
  787.         //THE STRING "C" IS FREE OF HTML HELP ADDED MATERIAL********************
  788.             //**********************************************************************
  789.         var d, f, g, h, test;
  790.          if(HoldBookTitLe.length > 60){
  791.             d = (parseInt(c.length/3));
  792.             f = (parseInt(c.length/8));
  793.             g = ((d) + (f));
  794.             h = c.substring(0, g);
  795.             test = h.lastIndexOf(' ');}
  796.          else{
  797.             d = (parseInt(c.length/3));
  798.             f = (parseInt(c.length/10));
  799.             g = ((d) + (f));
  800.             h = c.substring(0, g);
  801.             test = h.lastIndexOf(' ');}
  802.         
  803.         if (document.dir == "rtl"){
  804.             if(test == -1){
  805.                 var firstString = c;
  806.                 GetTheDivs[a].outerHTML = "<DIV CLASS='booktitleBRTL'><DIV CLASS='rtlimageBRTL'></DIV><DIV CLASS='booktitletextoneBRTL' ID='booktitletextoneBRTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoBRTL' ID='booktitletexttwoBRTL'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespacerBRTL'></DIV>\n\n";}
  807.             else{
  808.                 var firstString = h.substring(0, test);
  809.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  810.                 GetTheDivs[a].outerHTML = "<DIV CLASS='booktitleBRTL'><DIV CLASS='rtlimageBRTL'></DIV><DIV CLASS='booktitletextoneBRTL' ID='booktitletextoneBRTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoBRTL' ID='booktitletexttwoBRTL'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespacerBRTL'></DIV>\n\n";}}
  811.         else{
  812.             if(test == -1){
  813.                 var firstString = c;
  814.                 GetTheDivs[a].outerHTML = "<DIV CLASS='BookTitleB'><DIV CLASS='BookTitleTextOneB' ID='BookTitleTextOneB'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoB' ID='BookTitleTextTwoB'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpacerB'></DIV>\n\n";}
  815.             else{
  816.                 var firstString = h.substring(0, test);
  817.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  818.                 GetTheDivs[a].outerHTML = "<DIV CLASS='BookTitleB'><DIV CLASS='BookTitleTextOneB' ID='BookTitleTextOneB'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoB' ID='BookTitleTextTwoB'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpacerB'></DIV>\n\n";}}}
  819.  
  820.       //THIS OCCURS WHEN HTML HELP DOESN'T ADD HTML*****************************
  821.         //************************************************************************
  822.       else{
  823.         var d, f, g, h, test;
  824.          if(HoldBookTitLe.length > 60){
  825.             d = (parseInt(c.length/3));
  826.             f = (parseInt(c.length/8));
  827.             g = ((d) + (f));
  828.             h = c.substring(0, g);
  829.             test = h.lastIndexOf(' ');}
  830.          else{
  831.             d = (parseInt(c.length/3));
  832.             f = (parseInt(c.length/10));
  833.             g = ((d) + (f));
  834.             h = c.substring(0, g);
  835.             test = h.lastIndexOf(' ');}
  836.         
  837.         if (document.dir == "rtl"){
  838.             if(test == -1){
  839.                 var firstString = c;
  840.                 GetTheDivs[a].outerHTML = "<DIV CLASS='booktitleBRTL'><DIV CLASS='rtlimageBRTL'></DIV><DIV CLASS='booktitletextoneBRTL' ID='booktitletextoneBRTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoBRTL' ID='booktitletexttwoBRTL'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespacerBRTL'></DIV>\n\n";}
  841.             else{
  842.                 var firstString = h.substring(0, test);
  843.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  844.                 GetTheDivs[a].outerHTML = "<DIV CLASS='booktitleBRTL'><DIV CLASS='rtlimageBRTL'></DIV>    <DIV CLASS='booktitletextoneBRTL' ID='booktitletextoneBRTL'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='booktitletexttwoBRTL' ID='booktitletexttwoBRTL'><NOBR>"+ secondString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='booktitlespacerBRTL'></DIV>\n\n";}}
  845.         else{
  846.             if(test == -1){
  847.                 var firstString = c;
  848.                 GetTheDivs[a].outerHTML = "<DIV CLASS='BookTitleB'><DIV CLASS='BookTitleTextOneB' ID='BookTitleTextOneB'><NOBR>"+ firstString +"<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoB' ID='BookTitleTextTwoB'><NOBR><IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpacerB'></DIV>\n\n";}
  849.             else{
  850.                 var firstString = h.substring(0, test);
  851.                 var secondString = c.substring(((firstString.length) + (1)), c.length);
  852.                 GetTheDivs[a].outerHTML = "<DIV CLASS='BookTitleB'><DIV CLASS='BookTitleTextOneB' ID='BookTitleTextOneB'><NOBR>"+ firstString + "<IMG SRC='"+SpacerGiffy+"' WIDTH='58' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERA'></NOBR></DIV><DIV CLASS='BookTitleTextTwoB' ID='BookTitleTextTwoB'><NOBR>"+ secondString + "<IMG SRC='"+SpacerGiffy+"' WIDTH='75' HEIGHT='1' ALT='' BORDER='0' CLASS='SPACERB'></NOBR></DIV></DIV><DIV CLASS='BookTitleSpacerB'></DIV>\n\n";}}}
  853.      if(HoldBookTitLe.length > 60){
  854.         if(document.dir == "rtl"){
  855.             booktitletextoneBRTL.style.fontSize = "10PT"
  856.             booktitletexttwoBRTL.style.fontSize = "8PT";
  857.             booktitletexttwoBRTL.style.letterSpacing = "-.2MM";
  858.             booktitletextoneBRTL.style.top = "2PX";
  859.             booktitletexttwoBRTL.style.top = "14PX";}
  860.         else{
  861.             BookTitleTextOneB.style.fontSize = "10PT"
  862.             BookTitleTextTwoB.style.fontSize = "8PT";
  863.             BookTitleTextTwoB.style.letterSpacing = "-.2MM";
  864.             BookTitleTextOneB.style.top = "2PX";
  865.             BookTitleTextTwoB.style.top = "14PX";}}}
  866.             
  867.       //THIS GOES TO THE SECTION THAT CHECKS IF AN HTML HELP SEARCH OCCURRED******
  868.       //**************************************************************************
  869.     else if ((GetTheDivs[a].className.toLowerCase() == 'expand') || (GetTheDivs[a].className.toLowerCase() == 'expand2')){
  870.         var c = document.all(GetTheDivs[a].sourceIndex);
  871.         var d = GetTheDivs[a].innerHTML;
  872.             if ((d.indexOf('<FONT') != -1) && (d.indexOf('BACKGROUND-COLOR:') != -1)){
  873.             c.style.display = "block";}}}
  874.  
  875.             
  876.   //THE FOURTH SECTION EXAMINES ALL P TAGS**************************************
  877.   //****************************************************************************
  878.   var GetThePs = document.all.tags('P');
  879.   for (var a = 0; a < GetThePs.length; a++){
  880.  
  881.     //THIS WRITES THE PROPER NOTE GIFS******************************************
  882.       //**************************************************************************
  883.       if (document.dir == "rtl"){
  884.           var NewClass = L_NotesRTL_Style;}
  885.     else{
  886.           var NewClass = L_NotesLTR_Style;}
  887.  
  888.     if (GetThePs[a].id.indexOf('Alert_Tip') != -1){
  889.         GetThePs[a].outerHTML = tipImg + "<P "+NewClass+">" + GetThePs[a].innerHTML + "</P>";}
  890.     else if (GetThePs[a].id.indexOf('Alert_Note') != -1){
  891.         GetThePs[a].outerHTML = noteImg + "<P "+NewClass+">" + GetThePs[a].innerHTML + "</P>";}
  892.     else if (GetThePs[a].id.indexOf('Alert_Important') != -1){
  893.         GetThePs[a].outerHTML = importantImg + "<P "+NewClass+">" + GetThePs[a].innerHTML + "</P>";}
  894.     else if (GetThePs[a].id.indexOf('Alert_Caution') != -1){
  895.         GetThePs[a].outerHTML = cautionImg + "<P "+NewClass+">" + GetThePs[a].innerHTML + "</P>";}
  896.     else if (GetThePs[a].id.indexOf('Alert_Warning') != -1){
  897.         GetThePs[a].outerHTML = warningImg + "<P "+NewClass+">" + GetThePs[a].innerHTML + "</P>";}}
  898.  
  899.  
  900.   //THIS SETS UP THE RELATED TOPICS POPUPS - WRITES TEXT AND STORES POPUP INFO**
  901.   //****************************************************************************
  902.  
  903.   //DETERMINE RTL OR LTR DOCUMENT AND SET THE P CLASS ACCORDINGLY***************
  904.   //****************************************************************************
  905.   var PClassSet, H1TitleStyle
  906.   if (document.dir == "rtl"){
  907.     PClassSet = L_RelPopPClassLeft_Style;
  908.     H1TitleStyle = L_RelPopAlign1RTL_Style;}
  909.   else{
  910.     PClassSet = L_RelPopPClassRight_Style;
  911.     H1TitleStyle = L_RelPopAlign1_Style;}
  912.     
  913.   if (document.all.item('TiTLE') != null){
  914.     if (((IE4) && (document.all.item('LinKs')) != null)){
  915.         ReltopicS = LinKs.innerHTML;
  916.         if (TiTLE.tagName == 'H1'){
  917.             TiTLE.outerHTML = "<P "+PClassSet+"><A HREF='#' ID='InnerNav' TITLE='"+L_RelTopAlt_AlternativeText+"'>" +InnerNavInitial+ "</A></P><H1 "+ H1TitleStyle +">" + TiTLE.innerHTML + "</H1>";}
  918.         else{
  919.             TiTLE.outerHTML = "<P "+PClassSet+"><A HREF='#' ID='InnerNav' TITLE='"+L_RelTopAlt_AlternativeText+"'>" +InnerNavInitial+ "</A></P><P CLASS='PROCLABEL' "+L_RelPopAlign2_Style+">" + TiTLE.innerHTML + "</P>";}}
  920.     else{
  921.         if (TiTLE.tagName == 'H1'){
  922.             TiTLE.outerHTML = "<P "+PClassSet+">"+RelPopSpacerGif+"</P><H1 "+L_RelPopAlign1A_Style+">" + TiTLE.innerHTML + "</H1>";}
  923.         else{
  924.             TiTLE.outerHTML = "<P "+PClassSet+">"+RelPopSpacerGif+"</P><P CLASS='PROCLABEL' "+L_RelPopAlign2A_Style+">" + TiTLE.innerHTML + "</P>";}}}
  925.  
  926.  
  927.     //SEPARATE SHORTCUT PASS TO INSERT ADDITIONAL A TAGS FOR ERRORS -SMJ_M******
  928.       //**************************************************************************
  929.     var collnA = document.all('shortcutA');
  930.     if (collnA != null){
  931.         var tempname = '#ShortcutError';
  932.         var temppre = '<A id=shortcutError onfocus="doShortcutError();" onblur="shortcutError_doOnBlur();" '
  933.                         + 'href="REQUIRED_FOR_ONFOCUS_CATCH" name="'+tempname;
  934.                         var temppost = '"></A>';
  935.         if (collnA.length == null){
  936.             collnA.errorName = tempname+'0';
  937.             collnA.onblur = shortcutA_doOnBlur;
  938.             collnA.insertAdjacentHTML('BeforeBegin',temppre+'0'+temppost);}
  939.         else{
  940.             for (var i=0; i<collnA.length; i++){
  941.                 collnA(i).errorName = tempname+i;
  942.                 collnA(i).onblur = shortcutError_doOnBlur;
  943.                 collnA(i).insertAdjacentHTML('BeforeBegin',temppre+i+temppost);}}}
  944.  
  945.     //DIV TAG PASS TO INSERT STANDARD PREFACE TEXT******************************
  946.       //**************************************************************************
  947.     var collnDIV = document.all('shortcutDIV');
  948.     if (collnDIV != null){
  949.         if (collnDIV.length == null){
  950.             collnDIV.insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text);
  951.             collnDIV.className = 'shortcutDIV_Inactive';}
  952.         else{
  953.             for (var i=0; i<collnDIV.length; i++){
  954.                 collnDIV(i).insertAdjacentHTML('AfterBegin',L_ShortcutDIV_Text);
  955.                 collnDIV(i).className = 'shortcutDIV_Inactive';}}}
  956.         
  957.  
  958.     //IF THE USER HAS IE4+ THEY WILL BE ABLE TO VIEW POPUP BOXES****************
  959.       //**************************************************************************
  960.     if (IE4){
  961.         document.body.insertAdjacentHTML('beforeEnd', popupDIV);
  962.         document.body.insertAdjacentHTML('beforeEnd', RelPopupDiV);}
  963.  
  964.     //THIS GOES TO THE SECTION THAT WRITES LINK OBJECT'S INNER HTML*************
  965.     //**************************************************************************
  966.     if ((IE4) && (LiNker)){
  967.         window.setTimeout('displayLinkedDocument()', 0);}
  968.  
  969. return;}
  970.  
  971.  
  972.  
  973. //********************************* ONMOUSE-OVER *******************************
  974. //******************************************************************************
  975. function gettingHot(){
  976.   e = window.event.srcElement;
  977.  
  978.  
  979.   //DETERMINES WHETHER THE USER ROLLED OVER AN HREF TAG*************************
  980.   //****************************************************************************
  981.   for (var a = 0; a < 5; a++){
  982.       if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
  983.     var eID = e.id;
  984.  
  985.  
  986.     //DETERMINES WHETHER THE USER ROLLED OVER A SHORTCUT ITEM - SMJ_H***********
  987.       //**************************************************************************
  988.     if ((eID == 'shortcutA') && (e.style.color != _Click)){        //className != 'shortcutA_Selected')){
  989.         shortcutIMG_Change(e,'Hot');
  990.         e.style.color = _Hot;
  991.         break;}
  992.  
  993.  
  994.     //DETERMINES WHETHER THE USER ROLLED OVER AN EXPAND/COLLAPSE ITEM***********
  995.       //**************************************************************************
  996.     else if (eID.indexOf('ExPand') != -1){
  997.         if (InlineImgOn){
  998.             expandGoesHot(e); break;}
  999.         else{
  1000.             GoesHot(e); break;}}
  1001.  
  1002.  
  1003.     //DETERMINES WHETHER THE USER ROLLED OVER A GLOSSARY POPUP ITEM*************
  1004.       //**************************************************************************
  1005.     else if (eID.indexOf('PopUp') != -1){
  1006.         if (InlineImgOn){
  1007.             //DOESN'T SEND IF GLOSSARY TERM CLICKED AND ROLLED OVER*************
  1008.               //******************************************************************
  1009.             if ((theTagIndex) != (e.sourceIndex)){
  1010.                 glossaryGoesHot(e); break;}}
  1011.         else{
  1012.             //DOESN'T SEND IF GLOSSARY TERM CLICKED AND ROLLED OVER*************
  1013.               //******************************************************************
  1014.             if ((theTagIndex) != (e.sourceIndex)){
  1015.                 GoesHot(e); break;}}}
  1016.         
  1017.     //DETERMINES WHETHER THE USER ROLLED OVER A RELATED TOPIC LINK**************
  1018.       //**************************************************************************
  1019.     else if (eID.indexOf('InnerNav') != -1){
  1020.         //DOESN'T SEND IF RELTOPIC ICON CLICKED AND ROLLED OVER*****************
  1021.           //**********************************************************************
  1022.         if ((theTagIndex2) != (e.sourceIndex)){
  1023.             InnerNavGoesHot(e); break;}}}
  1024.  
  1025.  
  1026. return;}
  1027.  
  1028.  
  1029.  
  1030. //********************************* ONMOUSE-OUT ********************************
  1031. //******************************************************************************
  1032. function gettingCold() {
  1033.   e = window.event.srcElement;
  1034.  
  1035.  
  1036.   //DETERMINES WHETHER THE USER ROLLED OUT OF AN HREF TAG***********************
  1037.   //****************************************************************************
  1038.   for (var a = 0; a < 5; a++){
  1039.        if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
  1040.     var eID = e.id;
  1041.  
  1042.  
  1043. //SMJ_I begin
  1044.  
  1045.     if ( (eID == 'shortcutA') && (e.style.color != _Click))        //(e.className != 'shortcutA_Selected') )
  1046.     {
  1047.         shortcutIMG_Change(e,'Cold');
  1048.         e.style.color = _Cold;
  1049.         break;
  1050.     }
  1051.     else
  1052.  
  1053. //SMJ_I end
  1054.  
  1055.  
  1056.     
  1057.     //DETERMINES WHETHER THE USER ROLLED OUT OF AN EXPAND/COLLAPSE ITEM*********
  1058.       //**************************************************************************
  1059.     if (eID.indexOf('ExPand') != -1){
  1060.         if (InlineImgOn){
  1061.             expandGoesCold(e); break;}
  1062.         else{
  1063.             GoesCold(e); break;}}
  1064.  
  1065.  
  1066.     //DETERMINES WHETHER THE USER ROLLED OUT OF A GLOSSARY POPUP ITEM***********
  1067.       //**************************************************************************
  1068.      else if (eID.indexOf('PopUp')!= -1){
  1069.         if (InlineImgOn){
  1070.             //DOESN'T SEND IF GLOSSARY TERM CLICKED AND ROLLED OVER*************
  1071.               //******************************************************************
  1072.             if ((theTagIndex) != (e.sourceIndex)){
  1073.                 glossaryGoesCold(e); break;}}
  1074.         else{
  1075.             //DOESN'T SEND IF GLOSSARY TERM CLICKED AND ROLLED OUT OF***********
  1076.               //******************************************************************
  1077.             if ((theTagIndex) != (e.sourceIndex)){
  1078.                 GoesCold(e); break;}}}
  1079.         
  1080.         
  1081.     //DETERMINES WHETHER THE USER ROLLED OUT OF A RELATED TOPIC LINK************
  1082.       //**************************************************************************
  1083.     else if (eID.indexOf('InnerNav') != -1){
  1084.         //DOESN'T SEND IF RELTOPIC ICON CLICKED AND ROLLED OUT OF***************
  1085.           //**********************************************************************
  1086.         if ((theTagIndex2) != (e.sourceIndex)){
  1087.             InnerNavGoesCold(e); break;}}}
  1088.  
  1089.  
  1090. return;}
  1091.  
  1092.  
  1093.  
  1094. //********************************** ONCLICK ***********************************
  1095. //******************************************************************************
  1096. function clickAndDo(){
  1097.   e = window.event.srcElement;
  1098.   
  1099.   //CAUSES A CLICK ON THE PAGE TO HIDE THE POPUP WINDOWS************************
  1100.   //****************************************************************************
  1101.   document.all.RelpopUpWindow.style.visibility = "hidden";
  1102.   document.all.popUpWindow.style.visibility = "hidden";
  1103.         
  1104.         
  1105.   //SETS POPUP WINDOW'S RESIZE VARIABLES TO FALSE*******************************
  1106.   //****************************************************************************
  1107.   WindowOne = false;               //TRUE IF USER CLICKS ON THE ID POPUP***********
  1108.   WindowTwo = false;               //TRUE IF USER CLICKS ON THE ID INNERNAV********
  1109.         
  1110.         
  1111.   //SETS GLOSSARY POPUP'S NEEDED VARIABLES TO FALSE*****************************
  1112.   //****************************************************************************
  1113.   popOpen = false;               //TRUE IF A GLOSSARY POPUP IS VISIBLE***********
  1114.   PopUp_InAPopUp = false;        //TRUE IF USER CLICKS A SEE ALSO GLOSSARY TERM**
  1115.   specialCheck = false;          //TRUE IF THE GLOSSARY TERM ISN'T IN TXT FILE***
  1116.   AnotherCheck = false;            //TRUE IF INLINE GIFS OFF AND HELP ADDED HTML***
  1117.         
  1118.   //DETERMINES IF A CLICK IS ON AN HREF TAG*************************************
  1119.   //****************************************************************************
  1120.   for (var a = 0; a < 5; a++){
  1121.        if ((e.tagName != 'A') && (e.parentElement != null)){e = e.parentElement;}
  1122.     eID = e.id;
  1123.  
  1124.     //XML Popup Code begin
  1125.     // This code not needed except to coexist with existing tdc code
  1126.     xmlTermRoot = ""    // glossary popup uses HREF='#' + scope + ":" + termID for lookup
  1127.     if (e.hash != null)
  1128.     {
  1129.         xmlTermRoot = e.hash;
  1130.     }
  1131.     //XML Popup Code end
  1132.  
  1133.  
  1134.     //VARIABLES USED TO CONTROL CLICK COLOR OF GLOSSARY LINK TEXT***************
  1135.     //**************************************************************************
  1136.     if (((eID.indexOf('PopUp') == -1) || (eID.indexOf('In_PopuP') == -1)) && (checkIt2)){
  1137.           var changeBack = document.all(theTagIndex);
  1138.           changeBack.style.color = _Cold;
  1139.           changeBack.style.textDecoration = "none";
  1140.         if (InlineImgOn){
  1141.             theImg = getImage2(theTagIndex);
  1142.                theImg.src = glossaryCold;}
  1143.           theTagIndex = false;
  1144.         checkIt2 = false;}
  1145.  
  1146.  
  1147.     //VARIABLES USED TO CONTROL CLICK COLOR OF RELATED TOPICS ICON**************
  1148.     //**************************************************************************
  1149.     if ((eID.indexOf('InnerNav') == -1) && (checkIt) && (theTagIndex2 != -1)){
  1150.          theImg = getImage2(theTagIndex2);
  1151.          theImg.src = InnerNavCold;
  1152.         theTagIndex2 = false;
  1153.         checkIt = false;}
  1154.     
  1155.  
  1156.     //DETERMINES IF A CLICK IS ON A THUMBNAIL***********************************
  1157.     //**************************************************************************
  1158.       if (eID.indexOf('ThumbNail') != -1){callThumbnail(e); break;}
  1159.  
  1160.  
  1161.     //DETERMINES IF A CLICK IS ON A PROCEDURE LINK******************************
  1162.     //**************************************************************************
  1163.     else if (eID.indexOf('ProCedure') != -1){callProcedure(e); break;}
  1164.  
  1165.  
  1166. //SMJ_D begin
  1167.  
  1168.  
  1169.     else if (eID == 'shortcutA')
  1170.     {
  1171.         callShortcut(e);
  1172.         break;
  1173.     }
  1174.  
  1175.  
  1176. //SMJ_D end
  1177.  
  1178.  
  1179.     //DETERMINES IF A CLICK IS ON AN EXPAND/COLLAPSE ITEM***********************
  1180.       //**************************************************************************
  1181.        else if (eID.indexOf('ExPand') != -1){
  1182.         if (InlineImgOn){
  1183.             callExpand(e); break;}
  1184.         else{
  1185.             callExpand2(e); break;}}
  1186.         
  1187.  
  1188.     //DETERMINES IF A CLICK IS ON A RELATED TOPIC LINK**************************
  1189.     //**************************************************************************
  1190.       if (eID.indexOf('InnerNav') != -1){
  1191.         lastClickedPopUp = e;    //USED BY THE WINDOW RESIZE FUNCTION************
  1192.         WindowTwo = true;
  1193.         checkIt = true;
  1194.         theTagIndex2 = e.sourceIndex;
  1195.         theImg = getImage2(theTagIndex2);
  1196.            theImg.src = InnerNavClick;
  1197.         callRelatedTopicS(e); break;}
  1198.  
  1199.  
  1200.     //DETERMINES IF A CLICK IS ON A GLOSSARY POPUP ITEM*************************
  1201.     //**************************************************************************
  1202.     else if (eID.indexOf('PopUp') != -1){
  1203.         lastClickedPopUp = e;    //USED BY THE WINDOW RESIZE FUNCTION************
  1204.         WindowOne = true;
  1205.             
  1206.         //THIS IS WHAT HAPPENS IF THE GLOSSARY IMAGE IS ON**********************
  1207.           //**********************************************************************
  1208.         if (InlineImgOn){
  1209.             //THIS CONTROLS THE ONCLICK COLOR OF THE GLOSSARY TEXT**************
  1210.               //******************************************************************
  1211.             checkIt2 = true;
  1212.             theTagIndex = true;
  1213.             theTagIndex = e.sourceIndex;
  1214.             AnotherTagIndex = parseInt(theTagIndex);
  1215.             e.style.color = _Click;
  1216.             theImg = getImage2(theTagIndex);
  1217.                theImg.src = glossaryClick;
  1218.  
  1219.             //THIS CAPTURES THE HTML THAT CONTAINS THE TERM*********************
  1220.               //******************************************************************
  1221.             WorkText = e.innerHTML;
  1222.               
  1223.             //THIS CHECKS FOR ADDED HTML FROM HTMLHELP SEARCH ENGINE************
  1224.               //******************************************************************
  1225.             if (WorkText.indexOf('BACKGROUND-COLOR:') != -1){
  1226.                 GetTheRealTerm();}
  1227.               
  1228.             //IF THERE IS NO ADDED HTML FROM HTMLHELP THIS IS WHAT HAPPENS******
  1229.               //******************************************************************
  1230.             else{
  1231.                 GetTheRealTerm2();}}
  1232.               
  1233.         //IF THE GLOSSARY IMAGE ISN'T ON THIS IS WHAT HAPPENS*******************    
  1234.           //**********************************************************************
  1235.         else{
  1236.             //THIS CONTROLS THE ONCLICK COLOR OF THE GLOSSARY TEXT**************
  1237.               //******************************************************************
  1238.             checkIt2 = true;
  1239.             theTagIndex = true;
  1240.             theTagIndex = e.sourceIndex;
  1241.             AnotherTagIndex = parseInt(theTagIndex);
  1242.             e.style.color = _Click;
  1243.             e.style.textDecoration = "underline";
  1244.  
  1245.             //THIS CAPTURES THE HTML THAT CONTAINS THE TERM*********************
  1246.               //******************************************************************
  1247.             WorkText = e.innerHTML;
  1248.               
  1249.             //THIS CHECKS FOR ADDED HTML FROM HTMLHELP SEARCH ENGINE************
  1250.               //******************************************************************
  1251.             if (WorkText.indexOf('BACKGROUND-COLOR:') != -1){
  1252.                 AnotherCheck = true;
  1253.                 GetTheRealTerm();}
  1254.             else{
  1255.                 TermDef = e.innerHTML;}}
  1256.             
  1257.             //AFTER GRABBING THE PRECISE TERM THE NEXT FUNCTION IS INVOKED******    
  1258.               //******************************************************************
  1259.             callGlossary(e, TermDef); break;}
  1260.             
  1261.     
  1262.     //DETERMINES WHETHER A CLICK IS ON A SEE ALSO GLOSSARY POPUP ITEM***********    
  1263.      //**************************************************************************
  1264.     else if (eID.indexOf('In_PopuP') != -1){
  1265.         //THIS CONTROLS THE ONCLICK COLOR OF THE GLOSSARY TEXT**************
  1266.           //******************************************************************
  1267.         checkIt2 = true;
  1268.         theTagIndex = parseInt(AnotherTagIndex);
  1269.           var changeBack = document.all(theTagIndex);
  1270.           changeBack.style.color = _Click;
  1271.         if (InlineImgOn){
  1272.             theImg = getImage2(theTagIndex);
  1273.                theImg.src = glossaryClick;}
  1274.         if (!InlineImgOn){
  1275.             changeBack.style.textDecoration = "underline";}
  1276.         
  1277.         //A NEEDED VARIABLE IS SET TO TRUE AND THE TERM IS PICKED UP************    
  1278.           //**********************************************************************
  1279.         PopUp_InAPopUp = true;
  1280.         TermDef = e.innerHTML;
  1281.             
  1282.         //AFTER GRABBING THE PRECISE TERM THE NEXT FUNCTION IS INVOKED**********
  1283.           //**********************************************************************
  1284.         callGlossary(e, TermDef); break;}}
  1285.             
  1286. return;}
  1287.  
  1288.  
  1289.  
  1290. //********************************* ONKEYPRESS *********************************
  1291. //******************************************************************************
  1292. function ieKey(){
  1293.   if (window.event.keyCode == 27){closeIE4();}
  1294.  
  1295.  
  1296. return;}
  1297.  
  1298.  
  1299.  
  1300. //*********************************** ONRESIZE *********************************
  1301. //******************************************************************************
  1302. function fixPopUps(){
  1303.  
  1304. //SMJ_Z begin
  1305.  
  1306.     var collnDIV = document.all('shortcutDIV');
  1307.     if (collnDIV != null)
  1308.     {
  1309.         var theA = null;
  1310.         var theDIV = null;
  1311.  
  1312.         if ( (collnDIV.length == null) && (collnDIV.className == 'shortcutDIV_Active') )
  1313.         {
  1314.             theA = document.all('shortcutA'); //only one shortcut
  1315.             theDIV = collnDIV;
  1316.         }
  1317.         else
  1318.             for (var i=0; i<collnDIV.length; i++)
  1319.             {
  1320.                 if (collnDIV(i).className == 'shortcutDIV_Active')
  1321.                 {
  1322.                     theA = document.all('shortcutA')(i);
  1323.                     theDIV = collnDIV(i);
  1324.                     break;
  1325.                 }
  1326.             }
  1327.         if (theA != null)    // (always come in pairs)
  1328.         {
  1329.             theDIV.style.left = Math.min(theA.children.tags('IMG')(0).offsetLeft,
  1330.                 (document.body.clientWidth-theDIV.offsetWidth-(1*document.body.leftMargin)) );
  1331.             theDIV.style.top  = theA.offsetTop+theA.offsetHeight+1;
  1332.  
  1333. /*            collnDIV(i).style.left = Math.min(theA.children.tags('IMG')(0).offsetLeft,
  1334.                 (document.body.clientWidth-collnDIV(i).offsetWidth-(1*document.body.leftMargin)) );
  1335.             collnDIV(i).style.top  = theA.offsetTop+theA.offsetHeight+1;
  1336. */
  1337.         }
  1338.     }
  1339.  
  1340. //    theDIV.style.left = Math.min(theA.children.tags('IMG')(0).offsetLeft,
  1341. //        (document.body.clientWidth-theDIV.offsetWidth-(1*document.body.leftMargin)) );
  1342. //    theDIV.style.top  = theA.offsetTop+theA.offsetHeight+1;
  1343.  
  1344. //SMJ_Z end
  1345.  
  1346.  
  1347.     //THIS FUNCTION AFFECTS POPUP WINDOWS ONLY**********************************
  1348.       //**************************************************************************
  1349.     if(lastClickedPopUp){
  1350.       var DecrementMarkerWidth = document.body.clientWidth;
  1351.       
  1352.  
  1353.         //THIS AFFECTS GLOSSARY POPUPS******************************************
  1354.           //**********************************************************************
  1355.            if (WindowOne){
  1356.  
  1357.           if (lastClickedPopUp.offsetParent.tagName.toLowerCase() == 'body'){
  1358.             if(((popUpWindow.style.pixelWidth) + (lastClickedPopUp.offsetLeft)) <= (DecrementMarkerWidth)){
  1359.                 popUpWindow.style.pixelLeft = (lastClickedPopUp.offsetLeft);}
  1360.             else if(((DecrementMarkerWidth) - (10)) > (popUpWindow.style.pixelWidth)){
  1361.                 popUpWindow.style.pixelLeft = ((DecrementMarkerWidth) - (popUpWindow.style.pixelWidth));}
  1362.             else{
  1363.                 popUpWindow.style.pixelLeft = (10);}
  1364.             popUpWindow.style.pixelTop = ((lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetHeight) + (1));}
  1365.  
  1366.           else if (lastClickedPopUp.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
  1367.             if(((popUpWindow.style.pixelWidth) + (lastClickedPopUp.offsetLeft) + (lastClickedPopUp.offsetParent.offsetLeft)) <= (DecrementMarkerWidth)){
  1368.                 popUpWindow.style.pixelLeft = ((lastClickedPopUp.offsetLeft) + (lastClickedPopUp.offsetParent.offsetLeft));}
  1369.             else if(((DecrementMarkerWidth) - (10)) > (popUpWindow.style.pixelWidth)){
  1370.                 popUpWindow.style.pixelLeft = ((DecrementMarkerWidth) - (popUpWindow.style.pixelWidth));}
  1371.             else{
  1372.                 popUpWindow.style.pixelLeft = (10);}
  1373.             popUpWindow.style.pixelTop = ((lastClickedPopUp.offsetHeight) + (lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetParent.offsetTop) + (1));}
  1374.  
  1375.           else if (lastClickedPopUp.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
  1376.             if(((popUpWindow.style.pixelWidth) + (lastClickedPopUp.offsetLeft) + (lastClickedPopUp.offsetParent.offsetLeft) + (lastClickedPopUp.offsetParent.offsetParent.offsetLeft)) <= (DecrementMarkerWidth)){
  1377.                 popUpWindow.style.pixelLeft = ((lastClickedPopUp.offsetLeft) + (lastClickedPopUp.offsetParent.offsetLeft) + (lastClickedPopUp.offsetParent.offsetParent.offsetLeft));}
  1378.             else if(((DecrementMarkerWidth) - (10)) > (popUpWindow.style.pixelWidth)){
  1379.                 popUpWindow.style.pixelLeft = ((DecrementMarkerWidth) - (popUpWindow.style.pixelWidth));}
  1380.             else{
  1381.                 popUpWindow.style.pixelLeft = (10);}
  1382.             popUpWindow.style.pixelTop = ((lastClickedPopUp.offsetHeight) + (lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetParent.offsetTop) + (lastClickedPopUp.offsetParent.offsetParent.offsetTop) + (1));}
  1383.  
  1384.           else{
  1385.             if (((popUpWindow.style.pixelTop) + (popUpWindow.style.pixelHeight)) > (document.body.clientHeight)){
  1386.                 popUpWindow.style.pixelTop = ((document.body.clientHeight) - (popUpWindow.style.pixelHeight));}
  1387.             if (((popUpWindow.style.pixelLeft) + (popUpWindow.style.pixelWidth)) > (document.body.clientWidth)){
  1388.                 popUpWindow.style.pixelLeft = ((document.body.clientWidth) - (popUpWindow.style.pixelWidth));}}}
  1389.  
  1390.  
  1391.         //THIS AFFECTS RELATED TOPICS POPUPS************************************
  1392.           //**********************************************************************
  1393.         else if (WindowTwo){
  1394.  
  1395.             //FIND OUT IF THIS IS AN RTL OR LTR DOCUMENT************************
  1396.               //******************************************************************
  1397.             if (document.dir=="rtl"){
  1398.                 RelpopUpWindow.style.pixelLeft = 10;}
  1399.             else{
  1400.                 RelpopUpWindow.style.pixelLeft = ((DecrementMarkerWidth) - (RelpopUpWindow.style.pixelWidth) - (10));}
  1401.                     
  1402.             RelpopUpWindow.style.pixelTop = ((lastClickedPopUp.offsetTop) + (lastClickedPopUp.offsetHeight) + (1));}}
  1403.             
  1404.             
  1405. return;}
  1406.  
  1407.  
  1408.  
  1409. //******************** SPECIAL PARSING FOR GLOSSARY POPUP TERM *****************
  1410. //******************************************************************************
  1411. function GetTheRealTerm(){
  1412.   var c, d, f;
  1413.  
  1414.   //IN THIS CASE WE DONT NEED TO REMOVE ANY IMAGES, INLINE IMGS ARE OFF, SO..***
  1415.   //****************************************************************************
  1416.   if (AnotherCheck){
  1417.  
  1418.     //THIS REMOVES ALL BUT THE TERM AND THE HTML FROM HTMLHELP******************
  1419.       //**************************************************************************
  1420.     d = "</FONT>";
  1421.     f = WorkText;
  1422.     f = f.replace(d,'');}
  1423.   else{
  1424.     c = WorkText.indexOf('width=12>');
  1425.     if (c == -1){return;}            
  1426.     d = "</FONT>";
  1427.  
  1428.     //THIS REMOVES ALL BUT THE TERM AND THE HTML FROM HTMLHELP******************
  1429.       //**************************************************************************
  1430.     f = WorkText.substring((c+9),WorkText.length);
  1431.     f = f.replace(d,'');}
  1432.                 
  1433.     //THIS REMOVES THE HTML ADDED BY HTMLHELP LEAVING THE TERM******************
  1434.       //**************************************************************************
  1435.     var g = f.indexOf('<');
  1436.     if (g == -1){return;}
  1437.     
  1438.     var h = f.indexOf('>');
  1439.     if (h == -1){return;}
  1440.     
  1441.     var i = f.substring(g,(h+1));
  1442.     f = f.replace(i,'');
  1443.     TermDef = f;
  1444.  
  1445.  
  1446. return TermDef;}
  1447.             
  1448.             
  1449. //THIS REMOVES THE IMAGE IF HTMLHELP HASN'T ADDED HTML AND LEAVES THE TERM****
  1450. //****************************************************************************            
  1451. function GetTheRealTerm2(){
  1452.     var c = WorkText.lastIndexOf('width=12>');
  1453.     if (c == -1){return;}
  1454.     else {TermDef = WorkText.substring((c+9),WorkText.length);}
  1455.  
  1456.  
  1457. return TermDef;}
  1458.  
  1459.  
  1460.  
  1461. //********************* SHORTCUT'S MOUSEOVER, MOUSEOUT, ETC... *****************
  1462. //******************************************************************************
  1463. function shortcutIMG_Change(theA,newstate){
  1464.     var t;
  1465.     switch (newstate){
  1466.         case 'Hot'        : t = BeforeReference + 'Basics/shortcuthot.gif'; break;
  1467.         case 'Selected'    : t = BeforeReference + 'Basics/shortcutclick.gif'; break;
  1468.         case 'Cold'        :
  1469.         default            : t = BeforeReference + 'Basics/shortcutcold.gif'; break;}
  1470.     theA.children.tags('IMG')(0).src = t;}
  1471.  
  1472.  
  1473.  
  1474. //******************************** EXPAND'S MOUSEOVER **************************
  1475. //******************************************************************************
  1476. function expandGoesHot(){
  1477.     e.style.color = _Hot;
  1478.     
  1479.     //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE**************
  1480.       //**************************************************************************
  1481.     var theDiv = GrabtheExpandDiv(e);
  1482.         
  1483.       if (theDiv.style.display == 'block'){
  1484.            theImg = getImage(e);
  1485.            theImg.src = expandHot;}
  1486.       else{
  1487.         theImg = getImage(e);
  1488.            theImg.src = closedHot;}
  1489.  
  1490.  
  1491. return;}
  1492.  
  1493.  
  1494.  
  1495. //******************************** EXPAND'S MOUSEOUT ***************************
  1496. //******************************************************************************
  1497. function expandGoesCold(){
  1498.         e.style.color = _Cold;
  1499.     
  1500.     //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE**************
  1501.       //**************************************************************************
  1502.     var theDiv = GrabtheExpandDiv(e);
  1503.         
  1504.     if (theDiv.style.display == 'block'){
  1505.            theImg = getImage(e);
  1506.         theImg.src = expand;}
  1507.     else {
  1508.         theImg = getImage(e);
  1509.         theImg.src = closed;}
  1510.  
  1511.  
  1512. return;}
  1513.  
  1514.  
  1515.  
  1516. //****************************** GLOSSARY'S MOUSEOVER **************************
  1517. //******************************************************************************
  1518. function glossaryGoesHot(){
  1519.     e.style.color = _Hot;
  1520.     theImg = getImage(e);
  1521.        theImg.src = glossaryHot;
  1522.  
  1523.  
  1524. return;}
  1525.  
  1526.  
  1527.  
  1528. //******************************* GLOSSARY'S MOUSEOUT **************************
  1529. //******************************************************************************
  1530. function glossaryGoesCold(){
  1531.     e.style.color = _Cold;
  1532.     theImg = getImage(e);
  1533.        theImg.src = glossaryCold;
  1534.  
  1535.  
  1536. return;}
  1537.  
  1538.  
  1539. //**************************** RELATED TOPICS MOUSEOVER ************************
  1540. //******************************************************************************
  1541. function InnerNavGoesHot(){
  1542.     theImg = getImage(e);
  1543.        theImg.src = InnerNavHot;
  1544.  
  1545.  
  1546. return;}
  1547.  
  1548.  
  1549.  
  1550. //***************************** RELATED TOPICS MOUSEOUT ************************
  1551. //******************************************************************************
  1552. function InnerNavGoesCold(){
  1553.     theImg = getImage(e);
  1554.        theImg.src = InnerNavCold;
  1555.  
  1556.  
  1557. return;}
  1558.  
  1559.  
  1560.  
  1561. //********************************* GENERIC MOUSEOVER **************************
  1562. //******************************************************************************
  1563. function GoesHot(){
  1564.     e.style.color = _Hot;
  1565.     e.style.textDecoration = "underline";
  1566.  
  1567.  
  1568. return;}
  1569.  
  1570.  
  1571.  
  1572. //********************************** GENERIC MOUSEOUT **************************
  1573. //******************************************************************************
  1574. function GoesCold(){
  1575.     e.style.color = _Cold;
  1576.     e.style.textDecoration = "none";
  1577.  
  1578.  
  1579. return;}
  1580.  
  1581.  
  1582.  
  1583. //***************************** FIND AREA TO EXPAND/COLLAPSE *******************
  1584. //******************************************************************************
  1585. function GrabtheExpandDiv(){
  1586. var theExpandDiv;
  1587.  
  1588.     for (var a = 0; a < 5; a++){
  1589.         var theTag = e.sourceIndex + e.children.length + a;
  1590.         theExpandDiv = document.all(theTag);
  1591.          if ((((theExpandDiv.tagName == 'DIV') || (theExpandDiv.tagName == 'SPAN')) && ((theExpandDiv.className.toLowerCase() == 'expand') || (theExpandDiv.className.toLowerCase() == 'expand2'))) || theTag == document.all.length){break;}}
  1592.  
  1593.  
  1594. return theExpandDiv;}
  1595.  
  1596.  
  1597.  
  1598. //***************** ROLLOVERS'S AND EXPAND/COLLAPSE GET IMAGE *****************
  1599. //******************************************************************************
  1600. function getImage(){
  1601.     var TheSpot;
  1602.     TheSpot = e;
  1603.  
  1604.     //DETERMINES IF A CLICK IS ON AN HREF TAG***********************************
  1605.       //**************************************************************************
  1606.     for (var a = 0; a < 5; a++){
  1607.         if ((TheSpot.tagName != 'A') && (TheSpot.parentElement != null)){TheSpot = TheSpot.parentElement;}
  1608.         var elemImg = TheSpot;
  1609.         if(elemImg.tagName == 'A'){elemImg = TheSpot.all.tags('IMG')(0); break;}}
  1610.  
  1611.  
  1612. return elemImg;}
  1613.  
  1614.  
  1615.  
  1616. //************ HANDLES GREY STATE OF GLOSSARY AND RELTOPIC POPUPS **************
  1617. //******************************************************************************
  1618. function getImage2(){
  1619.     var TheSpot;
  1620.  
  1621.     //FOR THE RELATED TOPICS POPUP**********************************************
  1622.       //**************************************************************************
  1623.     if ((checkIt) && (theTagIndex2 != -1)){
  1624.         TheSpot = document.all(theTagIndex2);}
  1625.  
  1626.     //FOR THE GLOSSARY POPUP****************************************************
  1627.       //**************************************************************************
  1628.     else if ((checkIt2) && (theTagIndex != -1)){
  1629.         TheSpot = document.all(theTagIndex);}
  1630.     else{return;}
  1631.  
  1632.     //DETERMINES IF A CLICK IS ON AN HREF TAG***********************************
  1633.       //**************************************************************************
  1634.     for (var a = 0; a < 5; a++){
  1635.          if ((TheSpot.tagName != 'A') && (TheSpot.parentElement != null)){TheSpot = TheSpot.parentElement;}
  1636.         var elemImg = TheSpot;
  1637.         if(elemImg.tagName == 'A'){elemImg = TheSpot.all.tags('IMG')(0); break;}}
  1638.  
  1639.  
  1640. return elemImg;}
  1641.  
  1642.  
  1643.  
  1644. //************************* CALL THE THUMBNAIL WINDOW **************************
  1645. //******************************************************************************
  1646. function callThumbnail(){
  1647.  
  1648.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  1649.   //****************************************************************************
  1650.   event.returnValue = false;
  1651.   
  1652.   var eH = e.href.toLowerCase();
  1653.   sParamFILE = get_TheUrL(eH);  
  1654.     
  1655.     //IF THE THUMBNAIL OBJECT EXISTS IT IS NOW REMOVED FROM THE PAGE************
  1656.       //**************************************************************************
  1657.       if (document.hhThumbnail){document.hhThumbnail.outerHTML = "";}
  1658.     
  1659.     //THIS PART BUILDS THE THUMBNAIL OBJECT*************************************
  1660.       //**************************************************************************
  1661.     var h = "";
  1662.         h = h + "<OBJECT ID='hhThumbnail' "+ActX+" STYLE='display:none'>";
  1663.         h = h + "<PARAM NAME='Command' VALUE='Related Topics'>";
  1664.          h = h + "<PARAM NAME='Window' VALUE='$global_largeart'>";
  1665.         h = h + "<PARAM NAME='Item1'";
  1666.         h = h + "VALUE='$global_largeart;"+moniker+sParamFILE+"'>";
  1667.         h = h + "</OBJECT>"; 
  1668.         
  1669.     //THIS PART ADDS THE OBJECT TO THE BOTTOM OF THE PAGE***********************
  1670.       //**************************************************************************
  1671.       document.body.insertAdjacentHTML('beforeEnd', h);        
  1672.        
  1673.     //THIS PART CLICKS THE OBJECT SO THE POPUP WINDOW WILL APPEAR***************
  1674.       //**************************************************************************
  1675.     document.hhThumbnail.hhclick();
  1676.  
  1677.  
  1678. return;}
  1679.  
  1680.  
  1681.  
  1682. //**************************** CALL THE PROCESS WINDOW *************************
  1683. //******************************************************************************
  1684. function callProcedure(){
  1685.  
  1686.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  1687.   //****************************************************************************
  1688.   event.returnValue = false;
  1689.   
  1690.   var eH = e.href.toLowerCase();
  1691.   sParamFILE = get_TheUrL(eH);  
  1692.     
  1693.     //IF THE PROCEDURE OBJECT EXISTS IT IS NOW REMOVED FROM THE PAGE************
  1694.       //**************************************************************************
  1695.       if (document.hhProcedure){document.hhProcedure.outerHTML = "";}
  1696.     
  1697.     //THIS PART BUILDS THE PROCEDURE OBJECT*************************************
  1698.       //**************************************************************************
  1699.     var h = "";
  1700.         h = h + "<OBJECT ID='hhProcedure' "+ActX+" STYLE='display:none'>";
  1701.         h = h + "<PARAM NAME='Command' VALUE='Related Topics'>";
  1702.            h = h + "<PARAM NAME='Window' VALUE='$global_processtask'>";
  1703.            h = h + "<PARAM NAME='Item1'";
  1704.         h = h + "VALUE='$global_processtask;"+moniker+sParamFILE+"'>";
  1705.            h = h + "</OBJECT>";         
  1706.         
  1707.     //THIS PART ADDS THE OBJECT TO THE BOTTOM OF THE PAGE***********************
  1708.       //**************************************************************************
  1709.     document.body.insertAdjacentHTML('beforeEnd', h);
  1710.     
  1711.     //THIS PART CLICKS THE OBJECT SO THE POPUP WINDOW WILL APPEAR***************
  1712.       //**************************************************************************
  1713.     document.hhProcedure.hhclick();
  1714.  
  1715.  
  1716. return;}
  1717.  
  1718.  
  1719. //**************************** GET THE URL OUT OF HREF *************************
  1720. //******************************************************************************
  1721.  
  1722. //SMJ_C begin
  1723.  
  1724. // Borrowing code from NT shared.js... the iEND variable in callShortcut() is
  1725. // declared as a harmless local variable if the call isn't from callShortcut()
  1726. // Update: Usage of custom HTML tags make this function unnecessary for callShortcut();
  1727.  
  1728.  
  1729. function get_TheUrL(sHREF)
  1730. {
  1731.     var spaces = /\s/g;
  1732.     var eH = unescape(sHREF);
  1733.     eH    = eH.replace(spaces,'');
  1734.     eH_    = eH.toLowerCase(); //added
  1735.     
  1736.     var sParamFILE    = '';
  1737.     var sParamCHM    = '';
  1738.  
  1739.     var iFILE = eH_.lastIndexOf('file=');    // mod
  1740.     if (iFILE != -1)
  1741.     {
  1742.         iEND = iFILE+1;                        // see callShortcut()
  1743.         sParamFILE = eH.substring(iFILE+5, eH.length);
  1744.     }
  1745.     
  1746.     var iCHM = eH_.lastIndexOf('chm=');        // mod
  1747.     if (iCHM != -1)
  1748.     {
  1749.         iEND = iCHM+1;                        // see callShortcut()
  1750.         sParamCHM = eH.substring(iCHM+4, iFILE);
  1751.         sParamFILE= sParamCHM+"::/"+sParamFILE;
  1752.     }
  1753.     return sParamFILE;
  1754. }
  1755.  
  1756. /*    // original code (7/27/99):
  1757.  
  1758. function get_TheUrL(sAHREF){
  1759.     var spaces = /\s/g;
  1760.     var eH = unescape(sAHREF);
  1761.     eH = eH.replace(spaces,'');
  1762.     
  1763.     var sParamFILE= "";
  1764.     var sParamCHM= "";
  1765.  
  1766.     var iFILE = eH.lastIndexOf('file=');
  1767.     if (iFILE != -1){
  1768.         sParamFILE = eH.substring(iFILE+5, eH.length);}
  1769.  
  1770.     var iCHM = eH.lastIndexOf('chm=');
  1771.     if (iCHM != -1){                            
  1772.         sParamCHM = eH.substring(iCHM+4, iFILE);
  1773.         sParamFILE= sParamCHM+"::/"+sParamFILE;}
  1774.  
  1775.  
  1776. return sParamFILE;}
  1777. */
  1778.  
  1779. //SMJ_C end
  1780.  
  1781.  
  1782. //SMJ_A begin
  1783.  
  1784. // callShortcut ////////////////////////////////////////////////////
  1785. //
  1786. //    Creates an HTML Help object to send a window message to another 
  1787. //    application (in this case to open it to a specific dialog box
  1788. //    or similar UI destination. On failure the object navigates to an
  1789. //    <A> error handler on the same page, #ShortcutErrorX, which is added
  1790. //    during onload(). When the errorhandler A tag receives focus, it
  1791. //    applies correct error styles to the link and the corresponding
  1792. //    error-message DIV. When the errorhandler A tag loses focus, it
  1793. //    resets these styles to normal, hiding the DIV again.
  1794. //
  1795. //////////////////////////////////////////////////////////////////////
  1796.  
  1797. function callShortcut(theA)
  1798. {
  1799.     event.returnValue = false;    //kill bubble
  1800.  
  1801.     if (theA.APPLICATION == null)
  1802.         return;
  1803.     var pmItem1  = '<PARAM name="Item1"  value="'+theA.APPLICATION+'">';
  1804.     var pmItem2  = (theA.WINDOW_MSG == null)?'':(
  1805.                '<PARAM name="Item2"  value="'+theA.WINDOW_MSG)+'">';
  1806.     var pmWindow = '<PARAM name="Window" value="'+theA.errorName+'">';
  1807.  
  1808.     var sObjectText = 
  1809.          '<OBJECT id=objShortcut type="application/x-oleobject"'
  1810.         +'        classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"'
  1811.         +'        codebase="hhctrl.ocx#Version=4,73,8412,0">'
  1812.         +'    <PARAM name="Command" value="ShortCut">'
  1813.         +pmItem1
  1814.         +pmItem2
  1815.         +pmWindow
  1816.         +'</OBJECT>';
  1817.         
  1818.     if (document.objShortcut != null)
  1819.         document.objShortcut.outerHTML = '';    //delete any existing object
  1820.     document.body.insertAdjacentHTML('beforeEnd',sObjectText);
  1821.  
  1822.     shortcutIMG_Change(theA,'Selected');
  1823.     theA.style.color = _Click;    //theA.className = 'shortcutA_Selected';
  1824.  
  1825.     objShortcut.Click();
  1826. }
  1827.  
  1828. //SMJ_A end
  1829.  
  1830.  
  1831. //********************** STARTS THE RELATED TOPICS PROCESS *********************
  1832. //******************************************************************************
  1833. function callRelatedTopicS(){
  1834.  
  1835.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  1836.   //****************************************************************************
  1837.   event.returnValue = false
  1838.  
  1839.     document.all.RelpopUpWindow.innerHTML = L_RelTopHeader_Text + ReltopicS;
  1840.     document.all.RelpopUpWindow.style.fontSize = L_RelPopFontSize_Style;
  1841.     
  1842.     //FIND OUT IF THIS IS AN RTL OR LTR DOCUMENT********************************
  1843.     //**************************************************************************
  1844.     if (document.dir == "rtl"){
  1845.         document.all.RelpopUpWindow.style.left = 10;}
  1846.     else{
  1847.         document.all.RelpopUpWindow.style.left = ((document.body.clientWidth) - (RelpopUpWindow.style.pixelWidth) - (10));}
  1848.  
  1849.     document.all.RelpopUpWindow.style.top = ((document.all.InnerNav.offsetTop) + (document.all.InnerNav.offsetHeight) + 1);
  1850.     document.all.RelpopUpWindow.style.visibility = "visible";
  1851.  
  1852.  
  1853. return;}
  1854.  
  1855.  
  1856.  
  1857. //************************* STARTS THE GLOSSARY PROCESS ************************
  1858. //******************************************************************************
  1859. function callGlossary(){
  1860.  
  1861.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  1862.   //****************************************************************************
  1863.   event.returnValue = false;
  1864.     
  1865.     //THIS SECTION SETS THE X AND Y COORDINATES OF THE POPUP BOX****************
  1866.       //**************************************************************************
  1867.     if (PopUp_InAPopUp){
  1868.         ieX = document.all.popUpWindow.style.left;
  1869.         ieY = document.all.popUpWindow.style.top;}
  1870.     else{
  1871.         if (e.offsetParent.tagName.toLowerCase() == 'body'){
  1872.             ieX = e.offsetLeft;
  1873.             ieY = ((e.offsetTop) + (e.offsetHeight) + 1);}
  1874.         else if (e.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
  1875.             ieX = ((e.offsetLeft) + (e.offsetParent.offsetLeft));
  1876.             ieY = ((e.offsetHeight) + (e.offsetTop) + (e.offsetParent.offsetTop) + (1));}
  1877.         else if (e.offsetParent.offsetParent.offsetParent.tagName.toLowerCase() == 'body'){
  1878.             ieX = ((e.offsetLeft) + (e.offsetParent.offsetLeft) + (e.offsetParent.offsetParent.offsetLeft));
  1879.             ieY = ((e.offsetHeight) + (e.offsetTop) + (e.offsetParent.offsetTop) + (e.offsetParent.offsetParent.offsetTop) + (1));}
  1880.         else{
  1881.             ieX = window.event.clientX;
  1882.             ieY = window.event.clientY + document.body.scrollTop;}}
  1883.     
  1884.     //IF A POPUP WINDOW IS OPEN PAUSE AND THEN RESTART THIS PROCESS*************
  1885.       //**************************************************************************
  1886.     if (popOpen){window.setTimeout('callGlossary()', 50);}
  1887.  
  1888.     //IF THE USER DOESN'T HAVE IE4+ THIS SENDS A CUSTOM ERROR MESSAGE***********
  1889.       //**************************************************************************    
  1890.     if (noPopups){
  1891.         alert (L_BrowserAlert_Message);
  1892.         noPopupsMsg = true;
  1893.         noPopups = false;}
  1894.         
  1895.     //IF THE USER DOESN'T HAVE IE4+ THIS KILLS THE REST OF THE POPUP SCRIPT    ****
  1896.       //**************************************************************************
  1897.     if (noPopupsMsg){return;}
  1898.     
  1899.     //IF IE4+ AND NO POPUP OPEN WE GO TO THE NEXT PART OF THE SCRIPT************
  1900.       //**************************************************************************
  1901.     if ((IE4) && (!popOpen)){iePopup();}
  1902.  
  1903.  
  1904. return;}
  1905.  
  1906.  
  1907.  
  1908. //********************** START TO BUILD THE POPUP WINDOW ***********************
  1909. //******************************************************************************
  1910. function iePopup(){
  1911.  
  1912.     //DETERMINE IF THE POPUP WILL BE OFFSCREEN AND FIX THIS*********************
  1913.       //**************************************************************************
  1914.      var rightlimit = ieX + document.all.popUpWindow.offsetWidth;
  1915.     
  1916.     //IF IT'S OFF SCREEN THIS PART MOVES IT SO IT'S ON SCREEN*******************
  1917.       //**************************************************************************
  1918.     if (rightlimit >= document.body.clientWidth){ieX -= (rightlimit - document.body.clientWidth);}
  1919.     
  1920.     //Set And Position PopUpWindow**********************************************
  1921.       //**************************************************************************
  1922.     document.all.popUpWindow.innerHTML = "";
  1923.     document.all.popUpWindow.style.height = 0;
  1924.  
  1925. //XML Popup Code begin
  1926.     if (xmlGloss)    // test for XML or TXT glossary
  1927.     {
  1928.       // Get the formatted popup content (entry or "not found" message)
  1929.       xmlPopupContent = getXMLPopupContent(xmlTermRoot);
  1930.  
  1931.       // (Remaining code in this part copied from existing code.)
  1932.       // Load the popup window
  1933.       document.all.popUpWindow.innerHTML = xmlPopupContent;
  1934.  
  1935.       // Let the popup fill
  1936.       window.setTimeout ('iePopHeight()', 0);
  1937.  
  1938.       // Set popup window X, Y coordinates
  1939.       document.all.popUpWindow.style.top = ieY;
  1940.       document.all.popUpWindow.style.left = ieX;
  1941.  
  1942.       // Tell the world the popup is ready
  1943.       popOpen = true;
  1944.  
  1945.       // To prevent event bubble
  1946.       return (false);
  1947.     }
  1948.     else
  1949.     {        // Surround following existing code into the "else" with {}
  1950. //XML Popup Code end
  1951.  
  1952.         
  1953.     //IF THE GLOSSARY OBJECT EXISTS IT IS REMOVED FROM THE PAGE*****************
  1954.       //**************************************************************************
  1955.       if (document.tdcGloss){document.tdcGloss.outerHTML = "";}
  1956.     
  1957.     //THIS PART BUILDS THE GLOSSARY OBJECT**************************************
  1958.       //**************************************************************************
  1959.     var h = "";
  1960.         h = h + "<OBJECT ID='tdcGloss' CLASSID='clsid:333C7BC4-460F-11D0-BC04-0080C7055A83' VIEWASTEXT>";
  1961.         h = h + "<PARAM NAME='DataURL' VALUE='"+BeforeReference+"Basics/gloss.txt'>";
  1962.            h = h + "<PARAM NAME='UseHeader' VALUE='True'>";
  1963.            h = h + "<PARAM NAME='FieldDelim' VALUE=','>";
  1964.            h = h + "<PARAM NAME='EscapeChar' VALUE='#'>";
  1965.            h = h + "</OBJECT>";
  1966.                      
  1967.     //THIS PART ADDS THE OBJECT TO THE BOTTOM OF THE PAGE***********************
  1968.       //**************************************************************************
  1969.     document.body.insertAdjacentHTML('beforeEnd', h);
  1970.         
  1971.     //IF THE GLOSSARY TERM LIVES IN THE GLOSSARY TEXT FILE GET IT***************
  1972.       //**************************************************************************
  1973.     var CheckTermDef = tdcGloss.recordset;
  1974.     CheckTermDef.moveFirst();
  1975.     while (!CheckTermDef.EOF){
  1976.         if ((TermDef.toLowerCase()) == (CheckTermDef.fields('Term').value.toLowerCase())){
  1977.             specialCheck = true;
  1978.             GoToWork();
  1979.             break;} 
  1980.         CheckTermDef.moveNext();}
  1981.  
  1982.     //THIS PART PICKS UP AND STORES THE PROPER DEFINITION***********************
  1983.       //**************************************************************************
  1984.     function GoToWork(){
  1985.         defContent = tdcGloss.recordset.fields('Definition').value;
  1986.     
  1987.         //IF THERE ARE SEE ALSO'S THEY'RE PICKED UP AND THE HTML IS WRITTEN*****
  1988.           //**********************************************************************
  1989.         if (tdcGloss.recordset.fields('SeeAlso').value){
  1990.             if (tdcGloss.recordset.fields('SeeAlso').value.indexOf('~') != -1){
  1991.                 ParseOtherDefs();}
  1992.             else{
  1993.                 var seeAlsoContent = "";
  1994.                 seeAlsoContent = tdcGloss.recordset.fields('SeeAlso').value;
  1995.                 document.all.popUpWindow.innerHTML = "<H3 CLASS='GLOSSARY_ITEM'>" +TermDef+ "</H3><P>" +defContent+ "</P><P ID='OtherDefs'><B>See Also: </B><A ID='In_PopuP' HREF='#'>" +seeAlsoContent+ "</A></P>";}}
  1996.         else{
  1997.             document.all.popUpWindow.innerHTML = "<H3 CLASS='GLOSSARY_ITEM'>" +TermDef+ "</H3><P>" +defContent+ "</P>";}
  1998.  
  1999.         //TIMEOUT ALLOWS POPUP CONTENT TO FILL AND THEN GET POPUP HEIGHT********
  2000.           //**********************************************************************
  2001.         window.setTimeout ('iePopHeight()', 0);}
  2002.         
  2003.     //IF THE GLOSSARY DOESN'T CONTAIN THE TERM THIS ALERTS THE USER*************
  2004.       //**************************************************************************
  2005.     if (!specialCheck){
  2006.         document.all.popUpWindow.innerHTML = "<H3 CLASS='GLOSSARY_ITEM'>" +L_NoDefAlertTitle_Text+ "</H3><P>" +L_NoDefAlert_Text+ "</P>";
  2007.  
  2008.     //TIMEOUT ALLOWS POPUP CONTENT TO FILL AND THEN GET POPUP HEIGHT************
  2009.       //**************************************************************************
  2010.     window.setTimeout ('iePopHeight()', 0);}
  2011.  
  2012.     //THIS PART SETS THE X AND Y COORDS OF THE POPUP WINDOW*********************
  2013.       //**************************************************************************
  2014.     document.all.popUpWindow.style.top = ieY;
  2015.     document.all.popUpWindow.style.left = ieX;
  2016.     
  2017.     //NOW THIS VARIABLE IS SET TO TRUE BECAUSE THE POPUP IS READY***************
  2018.       //**************************************************************************
  2019.     popOpen = true;
  2020.     
  2021.     
  2022. //THIS KILLS THE BUBBLING OF THE EVENT******************************************
  2023. //******************************************************************************
  2024. return false;}
  2025.  
  2026. //XML Popup Code begin
  2027. }    // Ends the "else" of the "if" introduced above
  2028.  
  2029. //Note: Next function ParseOtherDefs not needed for XML
  2030. //XML Popup Code end
  2031.  
  2032.  
  2033. //********************* HANDLE CASE OF MULTIPLE SEE ALSO'S *********************
  2034. //******************************************************************************
  2035. function ParseOtherDefs(){
  2036.     var AimPnt = "";
  2037.     var FstStop = 0;
  2038.     var FstWrd = "";
  2039.     var DefsString = "";
  2040.     AimPnt = tdcGloss.recordset.fields('SeeAlso').value;
  2041.     DefsString = "<B>See Also: </B>";
  2042.     
  2043.     //THIS LOOPS GRABS ALL OF THE SEE ALSOS*************************************
  2044.       //**************************************************************************
  2045.     while (AimPnt.indexOf('~') != -1){
  2046.         FstStop = AimPnt.indexOf('~');
  2047.         FstWrd = AimPnt.substring(0, FstStop);
  2048.         DefsString = DefsString + "<A ID='In_PopuP' HREF='gloss_all.htm#def_" + FstWrd + "'>" + FstWrd + "</a>, ";
  2049.             
  2050.         AimPnt = AimPnt.substring(FstStop + 1, AimPnt.length);}
  2051.         
  2052.     //THIS PART WRITES THE PROPER DEFINITIONS WITH THE SEE ALSOS****************
  2053.       //**************************************************************************
  2054.     DefsString = DefsString + "<A ID='In_PopuP' HREF='gloss_all.htm#def_" + AimPnt + "'>" + AimPnt + "</a>";
  2055.     document.all.popUpWindow.innerHTML = "<H3 CLASS='GLOSSARY_ITEM'>" +TermDef+ "</H3><P>" +defContent+ "</P><P ID='OtherDefs'>" + DefsString + "</P>";
  2056.  
  2057.  
  2058. return;}
  2059.  
  2060.  
  2061.  
  2062. //*********************** GET THE HEIGHT OF POPUP WINDOW ***********************
  2063. //******************************************************************************
  2064. function iePopHeight(){
  2065.     var pageBottom = document.body.scrollTop + document.body.clientHeight;
  2066.     var popHeight = document.all.popUpWindow.offsetHeight;
  2067.     document.all.popUpWindow.style.height = popHeight - 2 * (parseInt(document.all.popUpWindow.style.borderWidth));
  2068.  
  2069.     //IF THE POPUP IS LONGER THAN THE VISIBLE WINDOW IT WRITES IT AT COORDS 00**
  2070.       //**************************************************************************
  2071.     if (popHeight + ieY >= pageBottom){
  2072.         if (popHeight <= pageBottom){
  2073.             document.all.popUpWindow.style.top = pageBottom - popHeight;}
  2074.         else{document.all.popUpWindow.style.top = 0;}}
  2075.         
  2076.     //THE POPUP WINDOW IS MADE VISIBLE HERE*************************************
  2077.       //**************************************************************************
  2078.     document.all.popUpWindow.style.visibility = "visible";
  2079.  
  2080.  
  2081. return;}
  2082.  
  2083.  
  2084.  
  2085. //*************************** CLOSE THE POPUP WINDOW ***************************
  2086. //******************************************************************************
  2087. function closeIE4(){
  2088.     document.all.popUpWindow.style.visibility = "hidden";
  2089.     popOpen = false;
  2090.  
  2091.  
  2092. return;}
  2093.  
  2094.  
  2095.  
  2096. //******************************* DO EXPAND/COLLAPSE ***************************
  2097. //******************************************************************************
  2098. function callExpand(){
  2099.  
  2100.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  2101.   //****************************************************************************
  2102.   event.returnValue = false;
  2103.     
  2104.     //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE**************
  2105.       //**************************************************************************
  2106.     var theDiv = GrabtheExpandDiv(e);
  2107.         
  2108.     //THIS PART WRITES THE PROPER IMAGE BESIDE THE TEXT*************************
  2109.       //**************************************************************************
  2110.     if (theDiv.style.display == 'block'){
  2111.         var theImg = getImage(e);
  2112.         theImg.src = closed;
  2113.         theDiv.style.display = "none";}
  2114.     else {
  2115.         var theImg = getImage(e);
  2116.         theImg.src = expand;
  2117.         theDiv.style.display = "block";}
  2118.  
  2119.  
  2120. return;}
  2121.  
  2122. function callExpand2(){
  2123.  
  2124.   //PREVENTS NAVIGATION ON HREF TAGS********************************************
  2125.   //****************************************************************************
  2126.   event.returnValue = false;
  2127.     
  2128.     //FIND THE EXPAND/COLLAPSE PORTION AND ASCERTAIN BLOCK VS NONE**************
  2129.       //**************************************************************************
  2130.     var theDiv = GrabtheExpandDiv(e);
  2131.         
  2132.     //THIS PART WRITES THE PROPER IMAGE BESIDE THE TEXT*************************
  2133.       //**************************************************************************
  2134.     if (theDiv.style.display == 'block'){
  2135.         theDiv.style.display = "none";}
  2136.     else {
  2137.         theDiv.style.display = "block";}
  2138.  
  2139.  
  2140. return;}
  2141.  
  2142.  
  2143. //SMJ_G begin
  2144.  
  2145. // (helper function)
  2146. function fLookupShortcutDIV(Index)    // returns ptr to the corresponding DIV element
  2147. {                                    // invariant: equal number of A and DIV elements
  2148.     var collnDIV = document.all('shortcutDIV');
  2149.     if (collnDIV == null)                                // at least one A/DIV pair?
  2150.         return null;
  2151.     var bIsACollection = (collnDIV.length != null);        // more than one?
  2152.     if ( (Index < 0)
  2153.         || ( (!bIsACollection) && (Index != 0) )
  2154.         || ( (bIsACollection) && (Index >= collnDIV.length) ) )
  2155.         return null;                                // out of bounds
  2156.     return (bIsACollection)?collnDIV(Index):collnDIV;
  2157. }
  2158.  
  2159. //    document.ondblclick=doOnDoubleClick;
  2160. //    function doOnDoubleClick(){alert(document.body.innerHTML);}
  2161.  
  2162. function doShortcutError()
  2163. {
  2164.     var e = window.event.srcElement;
  2165.  
  2166.     var collnA = document.all('shortcutA');
  2167.     var theA;
  2168.     if (collnA.length == null)
  2169.         theA = collnA;
  2170.     else
  2171.         for (var i=0; i<collnA.length; i++)
  2172.             if (collnA(i).errorName == e.name)
  2173.             {
  2174.                 theA = collnA(i);
  2175.                 break;
  2176.             }
  2177.     shortcutIMG_Change(theA,'Selected');
  2178.     theA.style.color = _Click;    //theA.className = 'shortcutA_Selected';
  2179.  
  2180.     var theDIV = fLookupShortcutDIV(1*e.name.substr(14));
  2181.  
  2182.     //position div
  2183.     theDIV.className = 'shortcutDIV_Active';
  2184.     theDIV.style.top  = theA.offsetTop+theA.offsetHeight+1;
  2185.     theDIV.style.left = Math.min(theA.children.tags('IMG')(0).offsetLeft,
  2186.         (document.body.clientWidth-theDIV.offsetWidth-(1*document.body.leftMargin)) );
  2187.  
  2188. }
  2189.  
  2190. function shortcutA_doOnBlur()
  2191. {
  2192.     CommonBlur();
  2193.     return;
  2194.  
  2195.     /////////
  2196.     var e = window.event.srcElement;
  2197.     var collnA = document.all('shortcutA');
  2198.     var theA;
  2199.     if (collnA.length == null)
  2200.         theA = collnA;
  2201.     else
  2202.         for (var i=0; i<collnA.length; i++)
  2203.             if (collnA(i).errorName == e.name)
  2204.             {
  2205.                 theA = collnA(i);
  2206.                 break;
  2207.             }
  2208.     shortcutIMG_Change(theA,'Cold');
  2209.     theA.style.color = _Cold;
  2210.  
  2211.     var theDIV = fLookupShortcutDIV(1*e.name.substr(14));
  2212.     theDIV.className = 'shortcutDIV_Inactive';
  2213.  
  2214.     window.event.cancelBubble = true;
  2215.  
  2216. }
  2217.  
  2218. function shortcutError_doOnBlur()
  2219. {
  2220.     CommonBlur();
  2221.     return;
  2222.  
  2223.     /////////
  2224.     var theA = window.event.srcElement;
  2225. //    var theA = document.all(e.sourceIndex+1);
  2226.  
  2227.     if (theA.id != 'shortcutA')
  2228.         theA = document.all(theA.sourceIndex+1);
  2229.     shortcutIMG_Change(theA,'Cold');
  2230.     theA.style.color = _Cold;
  2231.     
  2232.     window.event.cancelBubble = true;
  2233. }
  2234.  
  2235. function CommonBlur()
  2236. {
  2237.     var theA = window.event.srcElement;
  2238.     if (theA.id != 'shortcutA')
  2239.         theA = document.all(theA.sourceIndex+1);
  2240.     
  2241.     shortcutIMG_Change(theA,'Cold');
  2242.     theA.style.color = _Cold;
  2243.  
  2244.     var theDIV = fLookupShortcutDIV(1*theA.errorName.substr(14));
  2245.     theDIV.className = 'shortcutDIV_Inactive';
  2246.  
  2247.     window.event.cancelBubble = true;
  2248. }
  2249.  
  2250.  
  2251. //SMJ_G end
  2252.  
  2253. //XML Popup Code begin
  2254. function getXMLPopupContent(theXMLTermRoot)
  2255.   {
  2256.     var theXMLTerm, theXMLTermID;
  2257.     var theEntry;
  2258.     var theScopeDefs;
  2259.     var theScopes;
  2260.     var theDefinition;
  2261.     var theSeeAlsos, seeAlsoID, seeAlsoTerm;
  2262.     var theSeeEntry, seeID, seeTerm;
  2263.     var outText;
  2264.     var i, j, k, l, m;
  2265.     var scopeFound;
  2266.     var noDef = "<H3 CLASS='GLOSSARY_ITEM'>" + L_NoDefAlertTitle_Text + "</H3><P>" + L_NoDefAlert_Text + "</P>";
  2267.  
  2268.     // Check the term root exists
  2269.     if (theXMLTermRoot.length > 1)
  2270.     {
  2271.       theXMLTermID = theXMLTermRoot.substring(1, theXMLTermRoot.length);
  2272.       i = theXMLTermID.indexOf(":");
  2273.       if (i > 0)
  2274.       {
  2275.         theXMLTerm = theXMLTermID.substring(i+1, theXMLTermID.length);
  2276.       }
  2277.       else
  2278.         return (noDef);
  2279.     }
  2280.     else
  2281.     {
  2282.       return (noDef);
  2283.     }
  2284.                     
  2285.     // If XML Object Model not loaded, load it
  2286.     if (!xmlDOMLoaded)
  2287.     {
  2288.       xmlDOM = new ActiveXObject("Microsoft.XMLDOM");
  2289.       // Force object to finish loading the XML file before returning
  2290.       xmlDOM.async = false;
  2291.       // Load the XML file into the object model
  2292.       xmlDOM.load(xmlFile);        //("basics/gloss.xml");
  2293.       // Set the persisted flag
  2294.       xmlDOMLoaded = true;
  2295.     }
  2296.  
  2297.     outText = noDef;
  2298.  
  2299.     // Go to the entry node for the desired term
  2300.     theEntry = xmlDOM.nodeFromID(theXMLTerm);
  2301.     if (theEntry != null)
  2302.     {
  2303.       // found the entry, examine the scopeDefs
  2304.       theScopeDefs = theEntry.selectNodes("scopeDef");
  2305.       scopeFound = false;
  2306.       for (i = 0; i < theScopeDefs.length && !scopeFound; i++)
  2307.       {
  2308.         theScopes = theScopeDefs(i).selectNodes("scope");
  2309.         // check for our scope in this scopeDef
  2310.         for (j = 0; j < theScopes.length; j++)
  2311.         {
  2312.           if (theScopes(j).attributes.getNamedItem("scopeTermID").text == theXMLTermID)
  2313.           {
  2314.           // Found our scope in this entry - get and format the term and def data
  2315.             scopeFound = true;
  2316.             outText = formatXMLTerm(theEntry.selectSingleNode("term").text);
  2317.             if (theScopeDefs(i).selectSingleNode("def") != null)
  2318.             {
  2319.               theDefinition = formatXMLDef(theScopeDefs(i).selectSingleNode("def"));
  2320.               outText = outText + theDefinition;
  2321.  
  2322.               // Format the see alsos, if any
  2323.               theSeeAlsos = theScopeDefs(i).selectNodes("seeAlso");
  2324.               seeAlsoID = "";
  2325.               seeAlsoTerm = "";
  2326.               for (k = 0; k < theSeeAlsos.length; k++)
  2327.               {
  2328.                 seeAlsoID = theSeeAlsos(k).attributes.getNamedItem("seeAlsoID").text;
  2329.                 l = seeAlsoID.indexOf(":");
  2330.                 if (l > 0)
  2331.                 {
  2332.                   seeAlsoScope = seeAlsoID.substring(0, l + 1);
  2333.                   seeAlsoID = seeAlsoID.substring(l + 1, seeAlsoID.length);
  2334.                 }
  2335.                 else
  2336.                   seeAlsoScope = "";
  2337.                 
  2338.                 seeAlsoTerm = xmlDOM.nodeFromID(seeAlsoID).selectSingleNode("term").text;
  2339.                 // If k is zero, format first see also
  2340.                 outText = outText + formatXMLSeeAlso(seeAlsoScope + seeAlsoID, seeAlsoTerm, (k == 0));
  2341.               }        
  2342.               if (k > 0)
  2343.               {
  2344.                 // If there were see alsos, add the trailing paragraph mark
  2345.                 outText = outText + "</P>";
  2346.               }
  2347.             }
  2348.             else
  2349.             {
  2350.               theSeeEntry = theScopeDefs(i).selectSingleNode("seeEntry");
  2351.               seeID = theSeeEntry.attributes.getNamedItem("seeID").text;
  2352.               k = seeID.indexOf(":");
  2353.               if (k > 0)
  2354.               {
  2355.                 seeScope = seeID.substring(0, k + 1);
  2356.                 seeID = seeID.substring(k + 1, seeID.length);
  2357.               }
  2358.               else
  2359.                 seeScope = "";
  2360.               seeTerm = xmlDOM.nodeFromID(seeID).selectSingleNode("term").text;
  2361.               outText = outText + formatXMLSee(seeScope + seeID, seeTerm);
  2362.             } // end see term
  2363.           } // found our scope
  2364.         } // end for j
  2365.       } // end for i
  2366.     }
  2367.     else
  2368.     {
  2369.       // Term not found - just tell the user we forgot to test this glossary reference
  2370.       outText = noDef;
  2371.     }
  2372.     xmlTermRoot = "";    // Clean up the global
  2373.     return (outText);
  2374.  
  2375. // for debugging:    return ("XML - " + xmlTermRoot + " / " + theXMLTerm + " termText: " + termText + " defText: " + defText  + outText);    
  2376.   }
  2377.  
  2378. function formatXMLTerm(theTerm)
  2379.   {
  2380.     return ("<H3 CLASS='GLOSSARY_ITEM'>" + theTerm + "</H3>");
  2381.   }
  2382.  
  2383. function formatXMLDef(theDef)
  2384.   {
  2385.     var theParas;
  2386.     var i;
  2387.     var theDefOut;
  2388.  
  2389.     theParas = theDef.selectNodes("para");
  2390.     theDefOut = "";
  2391.     for (i = 0; i < theParas.length; i++)
  2392.     {
  2393.       theDefOut = theDefOut + "<P>" + theParas(i).text + "</P>";
  2394.     }        
  2395.     return (theDefOut);
  2396.   }
  2397.  
  2398. function formatXMLSee(theSeeTermID, theSeeTerm)
  2399. {
  2400.   var theSeeText;
  2401.  
  2402.   theSeeText = "<A ID='In_PopuP' HREF='#" + theSeeTermID + "'>" + theSeeTerm + "</A>";
  2403.   return ("<P ID='SeeDef'>" + L_See_Text + theSeeText);
  2404. }
  2405.  
  2406. function formatXMLSeeAlso(theSeeAlsoTermID, theSeeAlsoTerm, bFirstOne)
  2407.   {
  2408.     var theSeeAlsoText;
  2409.     theSeeAlsoText = "<A ID='In_PopuP' HREF='#XML" + theSeeAlsoTermID + "'>" + theSeeAlsoTerm + "</A>";
  2410.     if (bFirstOne)
  2411.     { 
  2412.       return ("<P ID='OtherDefs'>" + L_SeeAlso_Text + theSeeAlsoText);
  2413.     }
  2414.     else
  2415.     {
  2416.       return (", " + theSeeAlsoText);
  2417.     }
  2418.   }
  2419.  
  2420. //XML Popup Code end
  2421.  
  2422.  
  2423.  
  2424.  
  2425. //******************************* EVENT HANDLERS *******************************
  2426. //******************************************************************************
  2427. window.onload = loadInitialThings;
  2428. document.onmouseover = gettingHot;
  2429. document.onmouseout = gettingCold;
  2430. document.onclick = clickAndDo;
  2431. document.onkeypress = ieKey;
  2432. window.onresize = fixPopUps;
  2433.  
  2434.